[PATCH v8 09/20] crypto: move drbg to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for

[PATCH v8 06/20] crypto: introduce crypto wait for async op

2017-09-05 Thread Gilad Ben-Yossef
Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch adds a generic implementation for doing so in preparation for using it across the board instead of hand

[PATCH v8 10/20] crypto: move gcm to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/gcm.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index 3

[PATCH v8 13/20] dm: move dm-verity to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
dm-verity is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also avoids a future potential data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait prio

[PATCH v8 12/20] fscrypt: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36 ++-- fs/cry

[PATCH v8 11/20] crypto: move testmgr to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 204 ++---

[PATCH v8 14/20] cifs: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Pavel Shilovsky --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/fs/cif

[PATCH v8 15/20] ima: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Mimi Zohar --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39 deleti

Re: [PATCH 2/2] iio: ad7793: Fix the serial interface reset

2017-09-05 Thread Lars-Peter Clausen
On 09/05/2017 02:16 PM, Dragos Bogdan wrote: > The serial interface can be reset by writing 32 consecutive 1s to the device. > 'ret' was initialized correctly but its value was overwritten when > ad7793_check_platform_data() was called. Since a dedicated reset function > is present now, it should b

[PATCH v8 17/20] crypto: talitos: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/talitos.c | 38 +- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git

[PATCH v8 18/20] crypto: qce: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/qce/sha.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/drivers/c

[PATCH v8 19/20] crypto: mediatek: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Ryder Lee --- drivers/crypto/mediatek/mtk-aes.c | 31 +-- 1 file changed, 5 insertions(+), 26 d

[PATCH v8 20/20] crypto: adapt api sample to use async. op wait

2017-09-05 Thread Gilad Ben-Yossef
The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait pr

Re: [PATCH 1/2] iio: ad_sigma_delta: Implement a dedicated reset function

2017-09-05 Thread Lars-Peter Clausen
On 09/05/2017 02:14 PM, Dragos Bogdan wrote: > Since most of the SD ADCs have the option of reseting the serial > interface by sending a number of SCLKs with CS = 0 and DIN = 1, > a dedicated function that can do this is usefull. > > Signed-off-by: Dragos Bogdan Acked-by: Lars-Peter Clausen >

[PATCH v8 16/20] crypto: tcrypt: move to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 84 + 1 file changed, 25 insertions(+), 59 deletions(-) diff --git

Re: drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type

2017-09-05 Thread Arnd Bergmann
On Tue, Sep 5, 2017 at 12:33 PM, Arnd Bergmann wrote: > On Mon, Sep 4, 2017 at 7:01 PM, Randy Dunlap wrote: >> On 09/02/17 23:28, kbuild test robot wrote: > >> >> Summary: >> >> GENERIC_CLOCKEVENTS is not enabled. (ia64) >> COMPILE_TEST=y >> >> # >> # Clock Source drivers >> # >> CONFIG_TIMER_OF=

Re: [PATCH v2 6/6] drm/tegra: Use u64_to_user_ptr helper

2017-09-05 Thread Dmitry Osipenko
On 05.09.2017 11:10, Mikko Perttunen wrote: > Use the u64_to_user_ptr helper macro to cast IOCTL argument u64 values > to user pointers instead of writing out the cast manually. > > Signed-off-by: Mikko Perttunen > --- This patch doesn't apply to linux-next, you should probably rebase this serie

[PATCH v8 07/20] crypto: move algif to generic async completion

2017-09-05 Thread Gilad Ben-Yossef
algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/af_alg.c | 27 --- crypto/algif_aead.c | 8 crypto/algif_hash.c | 30 ++-

Re: kernel: tracepoints: add support for relative references

2017-09-05 Thread Jessica Yu
+++ Ard Biesheuvel [19/08/17 19:10 +0100]: To avoid the need for relocating absolute references to tracepoint structures at boot time when running relocatable kernels (which may take a disproportionate amount of space), add the option to emit these tables as relative references instead. Cc: Stev

Re: [RFC PATCH 1/6] dt-bindings: document stall and PASID properties for IOMMU masters

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > From: Jean-Philippe Brucker > > Document the bindings for stall and PASID capable platform devices. > > Signed-off-by: Jean-Philippe Brucker Huh? No, I don't think I did. Please leave the patch as you found it, and ask me for a version I consider clean n

Re: [RFC PATCH 2/6] iommu/of: Add stall and pasid properties to iommu_fwspec

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > From: Jean-Philippe Brucker > > Add stall and pasid properties to iommu_fwspec. > > Signed-off-by: Jean-Philippe Brucker No. This is a draft, I didn't sign it off. Thanks, Jean

Re: kernel: tracepoints: add support for relative references

2017-09-05 Thread Ard Biesheuvel
On 5 September 2017 at 13:48, Jessica Yu wrote: > +++ Ard Biesheuvel [19/08/17 19:10 +0100]: >> >> To avoid the need for relocating absolute references to tracepoint >> structures at boot time when running relocatable kernels (which may >> take a disproportionate amount of space), add the option t

Re: [RFC PATCH 4/6] iommu/arm-smmu-v3: Add SVM support for platform devices

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > From: Jean-Philippe Brucker > > Platform device can realise SVM function by using the stall mode. That > is to say, when device access a memory via iova which is not populated, > it will stalled and when SMMU try to translate this iova, it also will > stall

Re: [RFC PATCH 5/6] iommu/arm-smmu-v3: fix panic when handle stall mode irq

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > When SMMU do not support SVM feature, however the master support SVM, > which means matser can stall and with mult-pasid number, then the user > can bind a task to device using API like iommu_bind_task(). however, > when device trigger a stall mode fault i wi

Re: [RFC PATCH 6/6] iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD and CD.S

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > It is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which > means we should not disable stall mode if stall/terminate mode is not > configuable. > > Meanwhile, it is also ILLEGAL when STALL_MODEL==0b10 && CD.S==0 which > means if stall mode is forc

Re: [RFC PATCH 0/6] Add platform device SVM support for ARM SMMUv3

2017-09-05 Thread Jean-Philippe Brucker
On 31/08/17 09:20, Yisheng Xie wrote: > Jean-Philippe has post a patchset for Adding PCIe SVM support to ARM SMMUv3: > https://www.spinics.net/lists/arm-kernel/msg565155.html > > But for some platform devices(aka on-chip integrated devices), there is also > SVM requirement, which works based on th

Re: [PATCH 2/3] ovl: fix relatime for directories

2017-09-05 Thread Miklos Szeredi
On Tue, Sep 5, 2017 at 10:55 AM, Amir Goldstein wrote: [...] > Alternatively, update_ovl_inode_times() could use D_REAL_UPPER > and then we explicitly say that we don't care about lower mtime/ctime > modifications. Right, you convinced me that this is the right way to go. Updated patch below (an

[PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-09-05 Thread Pavel Tikhomirov
We have a problem on several our nodes with scsi EH. Imagine such an order of execution of two threads: CPU1 scsi_eh_scmd_add CPU2 scsi_host_queue_ready /* shost->host_busy == 1 initialy */ if (shost->shost_state == SHOST_RECOVERY)

[PATCH/RFC] ion: add movability support for page pools

2017-09-05 Thread Vitaly Wool
ion page pool may become quite large and scattered all around the kernel memory area. These pages are actually not used so moving them around to reduce fragmentation is quite cheap because there's no need to copy their contents. This patch implements callbacks that support page moving. Singed-off

[PATCH] staging:rtl8188eu:core Fix code Indent

2017-09-05 Thread Janani Sankara Babu
This patch is created to solve the code indentation issue Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/

Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 03:06:26PM +0300, Alexey Budankov wrote: > [ 6614.226305] WARNING: CPU: 45 PID: 43385 at kernel/events/core.c:239 > event_function+0xb3/0xe0 > [ 6614.226563] Call Trace: > [ 6614.226577] remote_function+0x3b/0x50 > [ 6614.226585] generic_exec_single+0x9a/0xd0 > [ 6614.22

Re: [PATCH 2/2] smp/hotplug,lockdep: Annotate cpuhp_state

2017-09-05 Thread Mike Galbraith
Mm, wants a build bandaid for !CONFIG_LOCKDEP kernel/cpu.c: In function ‘_cpu_down’: kernel/cpu.c:720:43: error: ‘cpuhp_state_down_key’ undeclared (first use in this function) lockdep_init_map(&cpuhp_state_lock_map, "cpuhp_state-down", ^ kernel/cpu.c:7

Re: [PATCH v2 4/6] gpu: host1x: Disassemble more instructions

2017-09-05 Thread Dmitry Osipenko
On 05.09.2017 11:10, Mikko Perttunen wrote: > The disassembler for debug dumps was missing some newer host1x opcodes. > Add disassembly support for these. > > Signed-off-by: Mikko Perttunen > --- > drivers/gpu/host1x/hw/debug_hw.c | 57 > --- > drivers/gpu/h

Re: [PATCH v2 5/6] gpu: host1x: Fix incorrect comment for channel_request

2017-09-05 Thread Dmitry Osipenko
On 05.09.2017 11:10, Mikko Perttunen wrote: > This function actually doesn't sleep in the version that was merged. > > Signed-off-by: Mikko Perttunen > --- > drivers/gpu/host1x/channel.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/host1x/channel.c b/dr

Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry()

2017-09-05 Thread Evgeniy Polyakov
Hi everyone 27.08.2017, 22:25, "SF Markus Elfring" : > From: Markus Elfring > Date: Sun, 27 Aug 2017 21:18:37 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Looks g

ORC unwinder and 'reliable' flag to printk_stack_address()

2017-09-05 Thread Jiri Kosina
Hi Josh, I just got the below stack trace with current Linus' tree with ORC unwinder enabled: [8.652765] Call Trace: [8.652767] dump_stack+0x7c/0xbf [8.652769] print_circular_bug+0x2d3/0x2e0 [8.652771] check_prev_add+0x666/0x700 [8.6

Re: [PATCH v4 2/2] add w1_ds28e17 driver for the DS28E17 Onewire to I2C master bridge

2017-09-05 Thread Evgeniy Polyakov
Hi Jan, Greg 19.07.2017, 23:14, "Jan Kandziora" : > This subpatch adds a driver for the DS28E17 Onewire to I2C master bridge. > > Signed-off-by: Jan Kandziora Greg, please queue this driver into your tree, it is sitting outside quite for a while and failed to be merged previously since I missed

Re: [PATCH] Workqueue lockup: Circular dependency in threads

2017-09-05 Thread Tejun Heo
Hello, On Thu, Aug 31, 2017 at 06:43:56PM +0530, Prateek Sood wrote: > > 6) cpuset_mutex is acquired by task init:1 and is waiting for cpuhotplug > > lock. Yeah, this is the problematic one. > > We can reorder the sequence of locks as in the below diff to avoid this > > deadlock. But I am looki

Re: execve(NULL, argv, envp) for nommu?

2017-09-05 Thread Alan Cox
> > anymore. But I'm already _running_ this program. If I could fork() I > > could already get a second copy of the sucker and call main() again > > myself if necessary, but I can't, so... You can - ptrace 8) > > honoring the suid bit if people feel that way. I just wanna unblock > > vfork() whil

[PATCH 4/4] paravirt,xen: correct xen_nopvspin case

2017-09-05 Thread Juergen Gross
With the boot parameter "xen_nopvspin" specified a Xen guest should not make use of paravirt spinlocks, but behave as if running on bare metal. This is not true, however, as the qspinlock code will fall back to a test-and-set scheme when it is detecting a hypervisor. In order to avoid this set the

[PATCH 2/4] paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal

2017-09-05 Thread Juergen Gross
Instead of special casing pv_lock_ops.vcpu_is_preempted when patching use _paravirt_false() on bare metal. Signed-off-by: Juergen Gross --- arch/x86/kernel/paravirt-spinlocks.c | 14 +- arch/x86/kernel/paravirt_patch_32.c | 10 -- arch/x86/kernel/paravirt_patch_64.c | 10 --

Re: [PATCH] w1: ds2490: constify usb_device_id and fix space before '[' error

2017-09-05 Thread Evgeniy Polyakov
Hi Arvind 12.08.2017, 11:38, "Arvind Yadav" : > usb_device_id are not supposed to change at runtime. All functions > working with usb_device_id provided by work with > const usb_device_id. So mark the non-const structs as const. > > Fix checkpatch.pl error: > ERROR: space prohibited before open s

[PATCH 1/4] paravirt: add generic _paravirt_false() function

2017-09-05 Thread Juergen Gross
Add a _paravirt_false() default function returning always false which can be used for cases where a boolean pvops replacement should just say "no". Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 2 ++ arch/x86/kernel/paravirt.c| 7 +++ arch/x86/kernel/pa

[PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" boot parameter). Today this has the downside of falling back to unfair test and set scheme for qspinlocks due to virt_spin_lock() detecting the virtualized environment. Make virt_spin_loc

[PATCH 0/4] make virt_spin_lock() a pvops function

2017-09-05 Thread Juergen Gross
With virt_spin_lock() being a pvops function the bare metal case can be optimized by patching the call away completely. In case a kernel running as a guest it can decide whether to use paravitualized spinlocks, the current fallback to the unfair test-and-set scheme, or to mimic the bare metal behav

[no subject]

2017-09-05 Thread baseballfchs
25097746468.doc Description: MS-Word document

Re: [RFC PATCH 01/11] workqueue: Add a decrement-after-return and wake if 0 facility

2017-09-05 Thread Tejun Heo
Hello, David. On Fri, Sep 01, 2017 at 04:40:53PM +0100, David Howells wrote: > Add a facility to the workqueue subsystem whereby an atomic_t can be > registered by a work function such that the work function dispatcher will > decrement the atomic after the work function has returned and then call

[RFC PATCH 01/17] perf: Allow mmapping only user page

2017-09-05 Thread Alexander Shishkin
The 'user page' contains offsets and sizes of data and aux areas of the ring buffer. If a user wants to mmap a pre-existing buffer, they need to know these in order to issue mmap()s with correct offsets and sizes. This enables mmapping of the user page if the ring buffer already exists. Signed-of

[RFC PATCH 00/17] perf: Detached events

2017-09-05 Thread Alexander Shishkin
Hi, I'm going to keep this short. Objective: include perf data (specifically, AUX/Intel PT) in process core dumps. Obstacles and how this patchset deals with them: (1) Need to be able to have perf events running without consumer (perf record) running in the background. Detached events: a new fla

[RFC PATCH 02/17] perf: Factor out mlock accounting

2017-09-05 Thread Alexander Shishkin
This patch moves ring buffer memory accounting down the rb_alloc() path so that its callers won't have to worry about it. This also serves the additional purpose of slightly cleaning up perf_mmap(). Signed-off-by: Alexander Shishkin --- kernel/events/core.c| 67 +++- ker

Re: [PATCH 0/2] smp/hotplug annotations

2017-09-05 Thread Thomas Gleixner
On Tue, 5 Sep 2017, Peter Zijlstra wrote: > These two patches appear to make hotplug work again without tripping lockdep. They cover the case where the plug/unplug succeeds, but they will not work when a plug/unplug operation fails, because after a fail it rolls back automatically, so in case UP

[for-next][PATCH 1/2] ftrace: Fix selftest goto location on error

2017-09-05 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" In the second iteration of trace_selftest_ops(), the error goto label is wrong in the case where trace_selftest_test_global_cnt is off. In the case of error, it leaks the dynamic ops that was allocated. Cc: sta...@vger.kernel.org Fixes: 95950c2e ("ftrace: Add self

[for-next][PATCH 2/2] ftrace: Fix memleak when unregistering dynamic ops when tracing disabled

2017-09-05 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" If function tracing is disabled by the user via the function-trace option or the proc sysctl file, and a ftrace_ops that was allocated on the heap is unregistered, then the shutdown code exits out without doing the proper clean up. This was found via kmemleak and r

[for-next][PATCH 0/2] tracing: A couple of memory leaks found and fixed

2017-09-05 Thread Steven Rostedt
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next Head SHA1: edb096e00724f02db5f6ec7900f3bbd465c6c76f Steven Rostedt (VMware) (2): ftrace: Fix selftest goto location on error ftrace: Fix memleak when unregistering dynamic ops when tracing disabled

Re: [PATCH v2 1/6] gpu: host1x: Enable Tegra186 syncpoint protection

2017-09-05 Thread Dmitry Osipenko
On 05.09.2017 11:10, Mikko Perttunen wrote: > Since Tegra186 the Host1x hardware allows syncpoints to be assigned to > specific channels, preventing any other channels from incrementing > them. > > Enable this feature where available and assign syncpoints to channels > when submitting a job. Syncp

Re: [PATCH] workqueue: Fix flag collision

2017-09-05 Thread Tejun Heo
On Sun, Sep 03, 2017 at 01:18:41AM +0100, Ben Hutchings wrote: > Commit 0a94efb5acbb ("workqueue: implicit ordered attribute should be > overridable") introduced a __WQ_ORDERED_EXPLICIT flag but gave it the > same value as __WQ_LEGACY. I don't believe these were intended to > mean the same thing,

[RFC PATCH 03/17] tracefs: De-globalize instances' callbacks

2017-09-05 Thread Alexander Shishkin
Currently, tracefs has exactly one special 'instances' subdirectory, where the caller can have their own .mkdir/.rmdir callbacks, which allow the caller to handle user's mkdir/rmdir inside that directory. Tracefs allows one set of these callbacks (tracefs_dir_ops). This patch de-globalizes tracefs

Re: [v7 1/5] mm, oom: refactor the oom_kill_process() function

2017-09-05 Thread Michal Hocko
On Mon 04-09-17 15:21:04, Roman Gushchin wrote: > The oom_kill_process() function consists of two logical parts: > the first one is responsible for considering task's children as > a potential victim and printing the debug information. > The second half is responsible for sending SIGKILL to all > t

[RFC PATCH 04/17] tracefs: Add ->unlink callback to tracefs_dir_ops

2017-09-05 Thread Alexander Shishkin
In addition to mkdir and rmdir, also allow unlink operation within the 'instances' directory if such callback is defined. Signed-off-by: Alexander Shishkin Cc: Steven Rostedt --- fs/tracefs/inode.c | 36 +++- include/linux/tracefs.h | 3 ++- kernel/trace/tr

[RFC PATCH 05/17] perf: Introduce detached events

2017-09-05 Thread Alexander Shishkin
There are usecases where it is desired to have perf events without the userspace tool running in the background to keep them alive, but instead only collect the data when it is needed, for example when an MCE event is triggered. This patch adds a new flag to the perf_event_open() syscall that allo

Re: [PATCH] hwmon: (k10temp) Add support for family 17h

2017-09-05 Thread Guenter Roeck
On 09/04/2017 11:47 PM, Clemens Ladisch wrote: Guenter Roeck wrote: Add support for temperature sensors on Family 17h (Ryzen) processors. Signed-off-by: Guenter Roeck --- Some of this is guesswork, but afaics it is working. No idea if there is a better way to determine the temperature offset.

Re: [PATCH 0/2] smp/hotplug annotations

2017-09-05 Thread Thomas Gleixner
On Tue, 5 Sep 2017, Thomas Gleixner wrote: > On Tue, 5 Sep 2017, Peter Zijlstra wrote: > > > These two patches appear to make hotplug work again without tripping > > lockdep. > > They cover the case where the plug/unplug succeeds, but they will not work > when a plug/unplug operation fails, beca

Re: [PATCH v2 04/18] firmware: arm_scmi: add common infrastructure and support for base protocol

2017-09-05 Thread Julien Thierry
Hi Sudeep, On 04/08/17 15:31, Sudeep Holla wrote: The base protocol describes the properties of the implementation and provide generic error management. The base protocol provides commands to describe protocol version, discover implementation specific attributes and vendor/sub-vendor identificat

[RFC PATCH 06/17] perf: Add buffers to the detached events

2017-09-05 Thread Alexander Shishkin
Detached events make much more sense with ring buffers, which the user can mmap and read a snapshot of. Unlike the normal perf events, these ring buffers are allocated by the perf syscall, the sizes of data and aux areas are specified in the event attribute. These ring buffers can be mmapped read-

[RFC PATCH 09/17] perf: Use shmemfs pages for userspace-only per-thread detached events

2017-09-05 Thread Alexander Shishkin
In order to work around the problem of using up mlocked memory for the detached events, we can pin the ring buffer pages only while they are in use (that is, the event is ACTIVE), and unpin them for the rest of the time. When not pinned in, these pages can be swapped out. This way, one user can hav

[RFC PATCH 10/17] perf: Implement pinning and scheduling for SHMEM events

2017-09-05 Thread Alexander Shishkin
A SHMEM buffer is only pinned in while its task is scheduled in and the pinning is done in a task work, which also implies that the corresponding event can only be started from that task work. Pinning is done on a per-cpu basis: if an event has previously been pinned on the local cpu, its unpinned

[RFC PATCH 07/17] perf: Add pmu_info to user page

2017-09-05 Thread Alexander Shishkin
Allow PMUs to supply additional static information that may be required by their decoders. Most of what Intel PT driver exports as capability attributes (timing packet freqencies, frequency ratios etc), its decoder needs to be able to correctly decode its binary stream. However, when decoding Intel

[RFC PATCH 08/17] perf: Allow inheritance for detached events

2017-09-05 Thread Alexander Shishkin
This enables inheritance for detached events. Unlike traditional events, these do not have parents: inheritance produces a new independent event with the same attribute. If the 'parent' event has a ring buffer, so will the new event. Considering the mlock accounting, this buffer allocation may fail

Re: [PATCH 1/2] PCI: iproc: export iproc_pcie_shutdown symbol

2017-09-05 Thread Bjorn Helgaas
On Tue, Sep 05, 2017 at 09:19:44AM +0200, Arnd Bergmann wrote: > The shutdown bugfix introduce a build regression for allmodconfig > kernels as the new function is not exported: > > ERROR: "iproc_pcie_shutdown" [drivers/pci/host/pcie-iproc-platform.ko] > undefined! > > This adds the missing expo

[RFC PATCH 11/17] perf: Implement mlock accounting for shmem ring buffers

2017-09-05 Thread Alexander Shishkin
With shmem ring buffers, one can mlock at most nr_pages * nr_cpus, we only need to do the accounting once the event is created (by means of sys_perf_event_open()). This implements such accounting, by adding a shared reference counter: when it goes 0 -> 1, we account the pages, when it goes to 0, we

Re: [PATCH v2 04/18] firmware: arm_scmi: add common infrastructure and support for base protocol

2017-09-05 Thread Sudeep Holla
On 05/09/17 14:39, Julien Thierry wrote: [...] >> diff --git a/drivers/firmware/arm_scmi/driver.c >> b/drivers/firmware/arm_scmi/driver.c >> index 139d6980f270..601d0d7210d9 100644 >> --- a/drivers/firmware/arm_scmi/driver.c >> +++ b/drivers/firmware/arm_scmi/driver.c >> @@ -108,18 +108,22 @@ s

Re: [v7 5/5] mm, oom: cgroup v2 mount option to disable cgroup-aware OOM killer

2017-09-05 Thread Michal Hocko
I will go and check patch 2 more deeply but this is something that I wanted to sort out first. On Mon 04-09-17 15:21:08, Roman Gushchin wrote: > Introducing of cgroup-aware OOM killer changes the victim selection > algorithm used by default: instead of picking the largest process, > it will pick t

Re: [RFC 1/2] dt-bindings: pwm-backlight: add brightness-levels-scale property

2017-09-05 Thread Guenter Roeck
On Mon, Sep 4, 2017 at 8:35 AM, Enric Balletbo i Serra wrote: > Brightness is not perceived linearly; rather, it typically follows some > kind of parabolic curve. We can support this by skipping values in the > brightness-levels array in a pseudo-quadratic curve. Typically we used > less than 256

Re: printk: what is going on with additional newlines?

2017-09-05 Thread Sergey Senozhatsky
On (09/05/17 14:21), Petr Mladek wrote: [..] > > that's why I want buffered printk to re-use the printk-safe buffer > > on that particular CPU [ if buffered printk will ever land ]. > > printk-safe buffer is not allocated on stack, or kmalloc-ed for > > temp usafe, and, more importantly, we flush i

Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote: > On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote: > > Recursive-read and the hint I proposed(a.k.a. might) should be used for > > their different specific applications. Both meaning and constraints of > > them are total

Re: [PATCH v2] w1:fix byteorder of W1_READ_ROM id under big-endian cpu

2017-09-05 Thread Evgeniy Polyakov
Hi 28.08.2017, 12:25, "chen.l...@zte.com.cn" : > Hi > > Q: > > But w1_reg_num has a different layout for be/le systems, isn't it enough? > > A: > > sure, it's right only under the assumption that 'rn' is a  correct layout id. > > Here's my example in be system which I encounter before. > > buf[0]

Re: [PATCH v6 0/3] enable eeprom "size" property and runtime pm

2017-09-05 Thread Sakari Ailus
Hi Divagar, On Mon, Sep 04, 2017 at 03:58:45PM +0530, Divagar Mohandass wrote: > This series adds support for eeprom "size" property which will be read by the > driver for eeprom size. The existing ACPI has a different default size which > can be overridden with a DSD property value provided by th

[RFC PATCH 12/17] perf: Track pinned events per user

2017-09-05 Thread Alexander Shishkin
Maintain a per-user cpu-indexed array of shmemfs-backed events, same way as mlock accounting. Signed-off-by: Alexander Shishkin --- include/linux/sched/user.h | 6 kernel/events/core.c| 14 - kernel/events/ring_buffer.c | 69 + k

Re: [HMM-v25 19/19] mm/hmm: add new helper to hotplug CDM memory region v3

2017-09-05 Thread Jerome Glisse
On Tue, Sep 05, 2017 at 11:50:57AM +0800, Bob Liu wrote: > On 2017/9/5 10:38, Jerome Glisse wrote: > > On Tue, Sep 05, 2017 at 09:13:24AM +0800, Bob Liu wrote: > >> On 2017/9/4 23:51, Jerome Glisse wrote: > >>> On Mon, Sep 04, 2017 at 11:09:14AM +0800, Bob Liu wrote: > On 2017/8/17 8:05, Jérôm

[RESEND PATCH v4] mfd: max77693: Add muic of_compatible in mfd_cell

2017-09-05 Thread Maciej Purski
This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: Maciej Purski Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Acked-for-MFD-by: Lee Jones --- v2: - added muic to documentation v3: - removed duplication

[RFC PATCH 13/17] perf: Re-inject shmem buffers after exec

2017-09-05 Thread Alexander Shishkin
A exec will unmap everything, but we want our shmem buffers to persist. This tells the page-pinning task work to mmap event's ring buffer after the task exec'ed. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 24 1 file changed, 24 insertions(+) diff --git

[RFC PATCH 14/17] perf: Add ioctl(REATTACH) for detached events

2017-09-05 Thread Alexander Shishkin
This adds an ioctl command to demote a detached event to a 'normal' one that gets destroyed when its file descriptor is closed. It can still be used to mmap the buffers, but not very useful otherwise. Signed-off-by: Alexander Shishkin --- include/uapi/linux/perf_event.h | 1 + kernel/events/cor

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 03:24:43PM +0200, Juergen Gross wrote: > diff --git a/arch/x86/include/asm/qspinlock.h > b/arch/x86/include/asm/qspinlock.h > index 48a706f641f2..fbd98896385c 100644 > --- a/arch/x86/include/asm/qspinlock.h > +++ b/arch/x86/include/asm/qspinlock.h > @@ -17,6 +17,25 @@ stati

[RFC / PATCH] hrtimer: consolidate hrtimer_init() + hrtimer_init_sleeper() calls

2017-09-05 Thread Sebastian Andrzej Siewior
hrtimer_init_sleeper() calls require a prior initialisation of the hrtimer object with hrtimer_init(). Lets make the initialisation of the hrtimer object part of hrtimer_init_sleeper(). This converts all users in one go. Everyone is using the on-stack version. Signed-off-by: Sebastian Andrzej Siew

Re: [patch 11/29] lockup_detector: Remove park_in_progress hackery

2017-09-05 Thread Thomas Gleixner
On Mon, 4 Sep 2017, Ulrich Obergfell wrote: > "b94f51183b06 ("kernel/watchdog: prevent false hardlockup on overloaded > system") tries to fix the following issue: > >watchdog_stop() > hrtimer_cancel() > perf_nmi_event_stop() > > If the task gets preempted after cancel

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 15:55, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 03:24:43PM +0200, Juergen Gross wrote: >> diff --git a/arch/x86/include/asm/qspinlock.h >> b/arch/x86/include/asm/qspinlock.h >> index 48a706f641f2..fbd98896385c 100644 >> --- a/arch/x86/include/asm/qspinlock.h >> +++ b/arch/x86/in

[RFC PATCH 15/17] perf: Allow controlled non-root access to detached events

2017-09-05 Thread Alexander Shishkin
The user who created the event should also be able to open its corresponding file in tracefs and/or remove it. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel/e

[RFC PATCH 16/17] perf/x86/intel/pt: Add PMU info

2017-09-05 Thread Alexander Shishkin
Add PMU-specific data structure with family/model/stepping and clock information required by the decoder. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 23 ++- arch/x86/events/intel/pt.h | 11 +++ 2 files changed, 33 insertions(+), 1 deletion(-)

[RFC PATCH 17/17] perf/x86/intel/bts: Add PMU info

2017-09-05 Thread Alexander Shishkin
Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/bts.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 16076eb346..ce1dac7115 100644 --- a/arch/x86/events/intel/bts.c +++ b/arch/x8

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Waiman Long
On 09/05/2017 09:24 AM, Juergen Gross wrote: > There are cases where a guest tries to switch spinlocks to bare metal > behavior (e.g. by setting "xen_nopvspin" boot parameter). Today this > has the downside of falling back to unfair test and set scheme for > qspinlocks due to virt_spin_lock() detec

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Peter Zijlstra
On Tue, Sep 05, 2017 at 10:02:57AM -0400, Waiman Long wrote: > On 09/05/2017 09:24 AM, Juergen Gross wrote: > > +static inline bool native_virt_spin_lock(struct qspinlock *lock) > > +{ > > + if (!static_cpu_has(X86_FEATURE_HYPERVISOR)) > > + return false; > > + > > I think you can tak

Re: tunnels: Don't apply GRO to multiple layers of encapsulation.

2017-09-05 Thread joe . korty
Hi Sasha, The backport of fac8e0f579695a3ecbc4d3cac369139d7f819971 tunnels: Don't apply GRO to multiple layers of encapsulation into 4.1 missed a hunk. The same backport into 3.18 was done correctly. This patch introduces the missing hunk into 4.1. Excepts from some emails: Joe Korty wro

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Waiman Long
On 09/05/2017 09:24 AM, Juergen Gross wrote: > There are cases where a guest tries to switch spinlocks to bare metal > behavior (e.g. by setting "xen_nopvspin" boot parameter). Today this > has the downside of falling back to unfair test and set scheme for > qspinlocks due to virt_spin_lock() detec

Re: [PATCH] hwmon: (k10temp) Add support for family 17h

2017-09-05 Thread Clemens Ladisch
Guenter Roeck wrote: > On 09/04/2017 11:47 PM, Clemens Ladisch wrote: >> Guenter Roeck wrote: >>> Some of this is guesswork, but afaics it is working. No idea if there >>> is a better way to determine the temperature offset. >> >> The reported value is not an absolute temperature on any CPU. >> >>

Re: [PATCH] staging:rtl8188eu Fix msleep < 20ms can sleep upto 20ms

2017-09-05 Thread Greg KH
On Tue, Sep 05, 2017 at 03:36:41PM +0530, Janani Sankara Babu wrote: > This patch solves the following warning shown by checkpatch script > Warning: msleep < 20ms can sleep for up to 20ms > > Signed-off-by: Janani Sankara Babu > --- > drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 2 +- > 1 fil

Changing FAT label of mounted file system

2017-09-05 Thread Pali Rohár
Hello! On most file system it is possible to change its label at anytime, when mounted or unmounted. But FAT is such special file system on which is label stored in two location, plus one is in directory structure (which cannot be modified when file system is mounted). I would like to ask what

Re: [PATCH 4.9 00/18] 4.9.48-stable review

2017-09-05 Thread Greg Kroah-Hartman
On Tue, Sep 05, 2017 at 02:59:37PM +0530, Sumit Semwal wrote: > Hi Greg, > > On 5 September 2017 at 12:41, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.9.48 release. > > There are 18 patches in this series, all will be posted as a response > > to this one

Re: [PATCH linux-next v6 1/1] spi: imx: Add support for SPI Slave mode

2017-09-05 Thread Fabio Estevam
[Adding Hector on Cc in case he could send his Tested-by tag] On Tue, Sep 5, 2017 at 2:12 AM, Jiada Wang wrote: > Previously i.MX SPI controller only works in Master mode. > This patch adds support to i.MX51, i.MX53 and i.MX6 ECSPI > controller to work also in Slave mode. > > Currently SPI Slave

Re: kmemleak not always catching stuff

2017-09-05 Thread Steven Rostedt
On Mon, 4 Sep 2017 11:09:05 +0100 Catalin Marinas wrote: > Hi Steve, > > On Fri, Sep 01, 2017 at 06:33:11PM -0400, Steven Rostedt wrote: > > Recently kmemleak discovered a bug in my code where an allocated > > trampoline for a ftrace function tracer wasn't freed due to an exit > > path. The thin

Re: [PATCH] staging:rtl8188eu Fix msleep < 20ms can sleep upto 20ms

2017-09-05 Thread Joe Perches
On Tue, 2017-09-05 at 15:36 +0530, Janani Sankara Babu wrote: > This patch solves the following warning shown by checkpatch script > Warning: msleep < 20ms can sleep for up to 20ms [] > diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c > b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c [] >

<    1   2   3   4   5   6   7   8   9   >