[PATCH 08/10] Staging: comedi: Used unsigned int instead of unsigned issue in jr3_pci.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the jr3_pci.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/jr3_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[PATCH 10/10] Staging: comedi: Preferd unsigned int instead of unsigned in comedi_bond.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the comedi_bond.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/comedi_bond.c | 10 +- 1 file changed, 5 insertions(+)

[PATCH 07/10] Staging: comedi: fix BIT macro issue in das6402.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This patch Replace all occurences of (1< --- drivers/staging/comedi/drivers/das6402.c | 56 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c index 1701294..f6319b3 1

[PATCH 04/10] Staging: comedi:Fix a warning issues in me_daq.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the me_daq.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/me_daq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 02/10] Staging: comedi: fix bare use of unsigned issue in ni_65xx.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the ni_65xx.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/ni_65xx.c | 18 +- 1 file changed, 9 insertions(+),

[PATCH 06/10] Staging: comedi: Prefer using the BIT macro issue in das16.c

2016-06-01 Thread Ravishankar Karkala Mallikarjunayya
This patch Replace all occurences of (1< --- drivers/staging/comedi/drivers/das16.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index fd8e0b7..69133e3 100644

[PATCH 6/8] cpufreq: Drop freq-table param to cpufreq_frequency_table_target()

2016-06-01 Thread Viresh Kumar
The policy already has this pointer set, use it instead. Signed-off-by: Viresh Kumar --- Documentation/cpu-freq/cpu-drivers.txt | 1 - drivers/cpufreq/amd_freq_sensitivity.c | 3 +-- drivers/cpufreq/cpufreq.c | 4 ++-- drivers/cpufreq/cpufreq_ondemand.c | 11 +-- driv

[PATCH 8/8] cpufreq: Return index from cpufreq_frequency_table_target()

2016-06-01 Thread Viresh Kumar
This routine can't fail unless the frequency table is invalid and doesn't contain any valid entries. Make it return the index and WARN() in case it is used for an invalid table. Signed-off-by: Viresh Kumar --- Documentation/cpu-freq/cpu-drivers.txt | 7 +++ drivers/cpufreq/amd_freq_sensiti

[PATCH V3 4/8] cpufreq: Remove cpufreq_frequency_get_table()

2016-06-01 Thread Viresh Kumar
Most of the callers of cpufreq_frequency_get_table() already have the pointer to a valid 'policy' structure and they don't really need to go through the per-cpu variable first and then a check to validate the frequency, in order to find the freq-table for the policy. Directly use the policy->freq_

[PATCH 2/8] cpufreq: s3c24xx: Remove useless checks

2016-06-01 Thread Viresh Kumar
These aren't required at all, remove them. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Viresh Kumar --- drivers/cpufreq/s3c24xx-cpufreq.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index ae8eaed77b70..

[PATCH 3/8] cpufreq: powerenv: Fix memory leak

2016-06-01 Thread Viresh Kumar
The policy is copied (unnecessarily) and is never freed. Fix it by just getting a reference to the existing policy structure and putting it back. Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernv-cpufreq.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/

[PATCH 1/8] ARM: s3c24xx: Sort cpufreq tables

2016-06-01 Thread Viresh Kumar
Some later changes in cpufreq core require these tables to be sorted based on ascending order of their frequencies. There was only one offender. Fix it and add comments over the arrays. Signed-off-by: Viresh Kumar --- arch/arm/mach-s3c24xx/pll-s3c2410.c | 3 ++- arch/arm/mach-s3c24xx/pl

[PATCH 7/8] cpufreq: Drop 'freq_table' argument of __target_index()

2016-06-01 Thread Viresh Kumar
It is already present as part of the policy and so no need to pass it from the caller. Also, 'freq_table' is guaranteed to be valid in this function and so no need to check it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 21 +++-- 1 file changed, 7 insertions(+),

[PATCH 5/8] cpufreq: ondemand: Don't keep a copy of freq_table pointer

2016-06-01 Thread Viresh Kumar
There is absolutely no need to keep a copy to the freq-table in 'struct od_policy_dbs_info'. Use policy->freq_table instead. Signed-off-by: Viresh Kumar --- drivers/cpufreq/amd_freq_sensitivity.c | 7 +++ drivers/cpufreq/cpufreq_ondemand.c | 22 +++--- drivers/cpufreq/cp

[PATCH V2 1/2] cpufreq: Store sorted frequency table

2016-06-01 Thread Viresh Kumar
The drivers aren't required to provide a sorted frequency table today, and its not optimal to work on an unsorted freq table. To simplify and improve code performance, create a frequency table within core and keep it sorted in ascending order. Note that this should eventually replace policy->freq

[PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target()

2016-06-01 Thread Viresh Kumar
cpufreq core keeps another table of sorted frequencies now and that can be used to find a match quickly, instead of traversing the unsorted list in an inefficient way. Create helper routines for separate relation types to optimize it further. Ideally the new routine cpufreq_find_target_index() is

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-06-01 Thread Tetsuo Handa
Michal Hocko wrote: > On Wed 01-06-16 00:53:03, Oleg Nesterov wrote: > > On 05/31, Michal Hocko wrote: > > > > > > Oleg has pointed out that can simplify both oom_adj_write and > > > oom_score_adj_write even further and drop the sighand lock. The only > > > purpose of the lock was to protect p->sig

Re: [RFC PATCH 3/4] PM / devfreq: rockchip: add devfreq driver for rk3399 dmc

2016-06-01 Thread MyungJoo Ham
On Wed, Jun 1, 2016 at 6:35 PM, Lin Huang wrote: > there is dfi controller on rk3399 platform, it can monitor > ddr load, register this controller to devfreq framework, and > default to use simple_ondeamnd policy, and do ddr frequency > scaling base on this result. > > Signed-off-by: Lin Huang >

Re: [PATCH 1/6] proc, oom: drop bogus task_lock and mm check

2016-06-01 Thread Michal Hocko
On Wed 01-06-16 19:41:09, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Wed 01-06-16 00:53:03, Oleg Nesterov wrote: > > > On 05/31, Michal Hocko wrote: > > > > > > > > Oleg has pointed out that can simplify both oom_adj_write and > > > > oom_score_adj_write even further and drop the sighand lock

Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking

2016-06-01 Thread Mika Westerberg
On Tue, May 31, 2016 at 02:32:14PM -0700, John Stultz wrote: > In commit 86d3473224b0 ("time: Introduce do_sys_settimeofday64()") > some of the checking for a valid timeval was subtley changed > which caused -EINVAL to be returned whenever the timeval was null. > > However, it is possible to set t

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-06-01 Thread Viresh Kumar
On 30-05-16, 09:35, Steve Muckle wrote: > The text above (the second sentence) seems okay to me in that it > mentions remote updates are not currently supported. Let me know if > there is specific text you would like included. Perhaps I got confused between cover-letter and this log. Leave that. I

[PATCH] rtc: ds1307: Fix relying on reset value for weekday

2016-06-01 Thread Keerthy
The reset value of weekday is 0x1. This is wrong since the reset values of the day/month/year make up to Jan 1 2001. When computed weekday comes out to be Monday. On a scale of 1-7(Sunday - Saturday) it should be 0x2. So we should not be relying on the reset value. Hence compute the wday using the

[PATCH] relay: fix potential memory leak

2016-06-01 Thread Zhouyi Zhou
when relay_open_buf fails in relay_open, program will goto free_bufs, but chan is nowhere freed. In addition, give warning to users who forget to provide create file hook. Signed-off-by: Zhouyi Zhou --- kernel/relay.c | 8 1 file changed, 8 insertions(+) diff --git a/kernel/relay.

RE: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Yuval Mintz
> > I think both solutions are equally valid/elegant. > > > > Arnd? > > I think we can just remove the IS_ENABLED() check there and define the > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is not set, > like some other drivers do > > diff --git a/drivers/net/ethernet/qlogic/q

Re: [PATCH v3 3/3] ACPI / button: Add quirks for initial lid state notification

2016-06-01 Thread Bastien Nocera
On Wed, 2016-06-01 at 18:10 +0800, Lv Zheng wrote: > Linux userspace (systemd-logind) keeps on rechecking lid state when the > lid state is closed. If it failed to update the lid state to open after > boot/resume, the system suspending right after the boot/resume could be > resulted. > Graphics dri

Re: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 10:55:02 AM CEST Yuval Mintz wrote: > > > I think both solutions are equally valid/elegant. > > > > > > Arnd? > > > > I think we can just remove the IS_ENABLED() check there and define the > > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is not set, >

Re: [PATCH] Revert "ARM: cns3xxx: pci: avoid potential stack overflow"

2016-06-01 Thread Krzysztof Hałasa
Bjorn Helgaas writes: > This reverts commit 498a92d42596a7a32c042319eb62a4c3d8081cf1. > > Krzysztof reported that this change broke Cavium CNS3xxx, ARMv6 (Laguna > GW-2388) because the MRRS setting is never written to the hardware. > > Signed-off-by: Bjorn Helgaas > CC: Arnd Bergmann > CC: Krzy

[PATCH v3 2/2] iommu: Remove cpu-local spinlock

2016-06-01 Thread Chris Wilson
By avoiding cross-CPU usage of the per-cpu iova cache, we can forgo having a spinlock inside the per-cpu struct. The only place where we actually may touch another CPU's data is when performing a cache flush after running out of memory. Here, we can instead schedule a task to run on the other CPU t

RE: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Yuval Mintz
> > > I think we can just remove the IS_ENABLED() check there and define > > > the > > > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is > > > not set, like some other drivers do > > > > I think that would be unsafe with current qede - qede currently > > publishes its VFs' PCI d

[PATCH v3 1/2] iommu: Disable preemption around use of this_cpu_ptr()

2016-06-01 Thread Chris Wilson
Between acquiring the this_cpu_ptr() and using it, ideally we don't want to be preempted and work on another CPU's private data. this_cpu_ptr() checks whether or not preemption is disable, and get_cpu_ptr() provides a convenient wrapper for operating on the cpu ptr inside a preemption disabled crit

Re: dma_declare_coherent_memory fails for RAM allocated memory

2016-06-01 Thread Brian Starkey
Hi Ivo, On Sun, May 29, 2016 at 05:56:02PM +0300, Ivaylo Dimitrov wrote: Hi, When trying to declare and use DT reserved memory region on ARM (OMAP3), dma_declare_coherent_memory() fails in memremap(). This is from today's master: [ cut here ] WARNING: CPU: 0 PID: 1 a

[RFC PATCH 0/4] Integration of function trace with System Trace IP blocks

2016-06-01 Thread Chunyan Zhang
IP blocks allowing a variety of trace sources to log debugging information to a pre-defined area have been introduced on a couple of architecture [1][2]. These system trace blocks (also known as STM) typically follow the MIPI STPv2 protocol [3] and provide a system wide logging facility to any devi

[RFC PATCH 4/4] stm: Mark the functions of writing buffer with notrace

2016-06-01 Thread Chunyan Zhang
If CONFIG_STM_FTRACE is selected, Function trace data would be writen to STM buffer, all functions that related to writing data packets to STM buffer should be marked 'notrace' to avoid being traced by Ftrace, otherwise the program would stall into an endless loop. Signed-off-by: Chunyan Zhang -

[RFC PATCH 1/4] STM Ftrace: Adding generic buffer interface driver

2016-06-01 Thread Chunyan Zhang
This patch adds a driver that models itself as an stm_source and who's sole purpose is to export an interface to the rest of the kernel. Once the stm and stm_source have been linked via sysfs, everything that is passed to the interface will endup in the STM trace engine. Signed-off-by: Chunyan Zh

[RFC PATCH 2/4] trace: Introduce an output interface from ftrace to STM

2016-06-01 Thread Chunyan Zhang
This patch is introducing a new function to print Ftrace messages to STM buffer when the traces happen. In order to reduce the effect on timing overhead as much as possible, only the current function and its parent ip address will be recorded into STM in this patch. This idea was first introduced

[RFC PATCH 3/4] trace: Duplicate the output of the function trace logs to STM

2016-06-01 Thread Chunyan Zhang
This patch adds an output from Ftrace to STM. That being said, Function trace messages would also be duplicated to STM buffer when being stored into ring buffer. Signed-off-by: Chunyan Zhang --- kernel/trace/trace.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/

Re: [PATCH -v3 4/8] locking, arch: Update spin_unlock_wait()

2016-06-01 Thread Will Deacon
Hi Peter, On Tue, May 31, 2016 at 11:41:38AM +0200, Peter Zijlstra wrote: > This patch updates/fixes all spin_unlock_wait() implementations. > > The update is in semantics; where it previously was only a control > dependency, we now upgrade to a full load-acquire to match the > store-release from

Re: [PATCH v2] livepatch: allow removal of a disabled patch

2016-06-01 Thread Christopher Arges
On Wed, Jun 01, 2016 at 10:31:59AM +0200, Miroslav Benes wrote: > 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

Re: [PATCH] devfreq: fix double call put_device

2016-06-01 Thread Chanwoo Choi
Dear Myungjoo, I reivewed this patch. But the merged patch[1] don't include the my reviewed-by tag. [1] https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=fixes&id=d90ea94c8f33dcda631885a3dbb2df063ba39efd Regards, Chanwoo Choi On Wed, May 18, 2016 at 8:07 PM, Chanwoo Choi

Re: [PATCH] dell-smm-hwmon: Detect fan with index=2

2016-06-01 Thread Tolga Cakir
Hi Pali, thanks for the patch and sorry for the delay! I've checked out https://git.kernel.org/cgit/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-staging&id=86c050c82dd527b17cf47043831f03646f402a88 and ran it on my Dell M3800. It correctly works for identifying 2 fans, one listed as "P

Re: [PATCH v7 1/6] mfd: max8997: Use regmap to access registers

2016-06-01 Thread Jacek Anaszewski
Hi Krzysztof, One thing drew my attention while reviewing this again: max8997_led_brightness_set() can sleep, but the brightness_set op it is assigned to must not sleep. At the time when this driver was merged we were delegating brightness setting to workqueues task in LED class drivers that can

[PATCH v2] ARM: uniphier: drop code for old DT binding

2016-06-01 Thread Masahiro Yamada
Commit 307d40c56b0c ("ARM: uniphier: rework SMP code to support new System Bus binding") added a new DT binding for SMP code, but still kept old code for the backward compatibility. Linux 4.6 was out with both bindings supported, so it should not hurt to drop the old code now. Moreover, the mainl

[PATCH v3 0/5] sched/fair: Fix attach and detach sched avgs for task group change or sched class change

2016-06-01 Thread Yuyang Du
Hi Peter, It seems the problem is even worse, and this fix hopefully should have fixed Vincent's addressed issue too. Thanks, Yuyang -- Yuyang Du (5): sched/fair: Clean up attach_entity_load_avg() sched/fair: Skip detach and attach new group task sched/fair: Skip detach sched avgs for new

[PATCH v3 1/5] sched/fair: Clean up attach_entity_load_avg()

2016-06-01 Thread Yuyang Du
attach_entity_load_avg() is called (indirectly) from: - switched_to_fair(): switch between classes to fair - task_move_group_fair(): move between task groups - enqueue_entity_load_avg(): enqueue entity Only in switched_to_fair() is it possible that the task's last_update_time is not 0 and ther

Re: [PATCH -v3 4/8] locking, arch: Update spin_unlock_wait()

2016-06-01 Thread Peter Zijlstra
On Wed, Jun 01, 2016 at 12:24:32PM +0100, Will Deacon wrote: > > --- a/arch/arm/include/asm/spinlock.h > > +++ b/arch/arm/include/asm/spinlock.h > > @@ -50,8 +50,22 @@ static inline void dsb_sev(void) > > * memory. > > */ > > > > -#define arch_spin_unlock_wait(lock) \ > > - do { while (arch

[PATCH v3 2/5] sched/fair: Skip detach and attach new group task

2016-06-01 Thread Yuyang Du
Vincent reported that the first task to a new task group's cfs_rq will be attached in attach_task_cfs_rq() and once more when it is enqueued (see https://lkml.org/lkml/2016/5/25/388). Actually, it is much worse. The load is currently attached mostly twice every time when we switch to fair class or

[PATCH v3 5/5] sched/fair: Add inline to detach_entity_load_evg()

2016-06-01 Thread Yuyang Du
detach_entity_load_evg() is only called by detach_task_cfs_rq(), so explicitly add inline attribute to it. Signed-off-by: Yuyang Du --- kernel/sched/fair.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index eb9041c..77428c4

[PATCH v3 4/5] sched/fair: Move load and util avgs from wake_up_new_task() to sched_fork()

2016-06-01 Thread Yuyang Du
Move new task initialization to sched_fork(). For initial non-fair class task, the first switched_to_fair() will do the attach correctly. Suggested-by: Peter Zijlstra Signed-off-by: Yuyang Du --- kernel/sched/core.c |5 +++-- kernel/sched/fair.c | 14 +- kernel/sched/sched.h

[PATCH v3 3/5] sched/fair: Skip detach sched avgs for new task when changing task groups

2016-06-01 Thread Yuyang Du
Newly forked task has not been enqueued, so should not be removed from cfs_rq. To do so, we need to pass the fork information all the way from sched_move_task() to task_move_group_fair(). Signed-off-by: Yuyang Du --- kernel/sched/auto_group.c |2 +- kernel/sched/core.c |8

Re: [PATCH v2] livepatch: allow removal of a disabled patch

2016-06-01 Thread Miroslav Benes
On Wed, 1 Jun 2016, Christopher Arges wrote: > On Wed, Jun 01, 2016 at 10:31:59AM +0200, Miroslav Benes wrote: > > > > diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c > > index 92819bb0961b..6cc49d253195 100644 > > --- a/kernel/livepatch/transition.c > > +++ b/kernel/liv

Re: [RFC PATCH 3/4] PM / devfreq: rockchip: add devfreq driver for rk3399 dmc

2016-06-01 Thread Chanwoo Choi
Hi Lin, This patch include the two features as following: - Monitor the ddr load - Control the ddr's clock with ondemand governor based on load The "Monitor the ddr load" has the specific the address in SoC. Namely, it is separate the module. So, I implemented the devfreq-event framework[1] which

Re: [lkp] [oom_reaper] df1e2f5663: EIP: [<81e30134>] mmput_async+0x9/0x6b SS:ESP 0068:819a5e78

2016-06-01 Thread Stephen Rothwell
ror message could be a bit better (something like "bad object", I guess). > So it seemed to be in linux-next but it is not in next-20160601. It is > in the Linus tree as e2fe14564d33 ("oom_reaper: close race with exiting > task") reachable from next-20160527. So when

Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends into asm-generic/barrier.h

2016-06-01 Thread Will Deacon
On Wed, Jun 01, 2016 at 11:31:58AM +0200, Peter Zijlstra wrote: > On Tue, May 31, 2016 at 04:01:06PM -0400, Waiman Long wrote: > > You are doing two READ_ONCE's in the smp_cond_load_acquire loop. Can we > > change it to do just one READ_ONCE, like > > > > --- a/include/asm-generic/barrier.h > > ++

Re: [PATCH] timekeeping: Fix 1ns/tick drift with GENERIC_TIME_VSYSCALL_OLD

2016-06-01 Thread Thomas Graziadei
On 06/01/2016 01:11 AM, John Stultz wrote: On Tue, May 31, 2016 at 6:06 AM, Thomas Graziadei wrote: From: Thomas Graziadei The user notices the problem in a raw and real time drift, calling clock_gettime with CLOCK_REALTIME / CLOCK_MONOTONIC_RAW on a system with no ntp correction taking place

[PATCH] ASoC: mediatek: add MCLK source selection

2016-06-01 Thread PC Liao
The new machine's MCLK source is from mt8173 which is dynamic from sampling rate*256. This patch provides the selection for device tree. Signed-off-by: PC Liao --- .../devicetree/bindings/sound/mt8173-rt5650.txt|5 +++ sound/soc/mediatek/mt8173-rt5650.c | 45 +++

[PATCH v4 0/6] powerPC/pSeries use pv-qpsinlock as the default spinlock implemention

2016-06-01 Thread Pan Xinhui
change from v3: a big change in [PATCH v4 4/6] pv-qspinlock: powerpc support pv-qspinlock no other patch changed. and the patch cover letter tilte has changed as only pseries may need use pv-qspinlock, not all powerpc. 1) __pv_wait will not return until *ptr != va

[PATCH v4 6/6] powerpc: pseries: Add pv-qspinlock build config/make

2016-06-01 Thread Pan Xinhui
pseries has PowerVM support, the default option is Y. Signed-off-by: Pan Xinhui --- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/platforms/pseries/Kconfig | 8 2 files changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index

[PATCH v4 3/6] powerpc: lib/locks.c: Add cpu yield/wake helper function

2016-06-01 Thread Pan Xinhui
pv-qspinlock core has pv_wait/pv_kick which will give a better performace by yielding and kicking cpu at some cases. lets support them by adding two corresponding helper functions. Signed-off-by: Pan Xinhui --- arch/powerpc/include/asm/spinlock.h | 4 arch/powerpc/lib/locks.c|

[PATCH v4] Drivers: hv: vmbus: fix the race when querying & updating the percpu list

2016-06-01 Thread Dexuan Cui
There is a rare race when we remove an entry from the global list hv_context.percpu_list[cpu] in hv_process_channel_removal() -> percpu_channel_deq() -> list_del(): at this time, if vmbus_on_event() -> process_chn_event() -> pcpu_relid2channel() is trying to query the list, we can get the kernel fa

[PATCH v4 5/6] pv-qspinlock: use cmpxchg_release in __pv_queued_spin_unlock

2016-06-01 Thread Pan Xinhui
cmpxchg_release is light-wight than cmpxchg, On some arch like ppc, barrier impact the performace too much. Suggested-by: Boqun Feng Signed-off-by: Pan Xinhui --- kernel/locking/qspinlock_paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/qspinlock_pa

[PATCH v4 2/6] powerpc: pseries/Kconfig: Add qspinlock build config

2016-06-01 Thread Pan Xinhui
pseries will use qspinlock by default. Signed-off-by: Pan Xinhui --- arch/powerpc/platforms/pseries/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index bec90fb..f669323 100644 --- a/arch/powerpc/platfo

[PATCH v4 1/6] qspinlock: powerpc support qspinlock

2016-06-01 Thread Pan Xinhui
Base code to enable qspinlock on powerpc. this patch add some #ifdef here and there. Although there is no paravirt related code, we can successfully build a qspinlock kernel after apply this patch. Signed-off-by: Pan Xinhui --- arch/powerpc/include/asm/qspinlock.h | 22 +

[PATCH v4 4/6] pv-qspinlock: powerpc support pv-qspinlock

2016-06-01 Thread Pan Xinhui
As we need let pv-qspinlock-kernel run on all environment which might have no powervm, we should runtime choose which qspinlock version to use. The default pv-qspinlock use native version. pv_lock initialization should be done in bootstage with irq disabled. And if there is PHYP, restore pv_lock_o

Re: [PATCH v3 12/12] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization on Odroid U3

2016-06-01 Thread Peter Chen
On Wed, Jun 01, 2016 at 10:02:21AM +0200, Krzysztof Kozlowski wrote: > On Odroid U3 (Exynos4412-based) board if USB was initialized by > bootloader (in U-Boot "usb start" before tftpboot), the HUB (usb3503) > and LAN (smsc95xx) after after successful probing were not visible in the > system ("lsusb

Re: [PATCH v2,1/5] dt-bindings: mt8173-xhci: support host side of dual-role mode

2016-06-01 Thread chunfeng yun
Hi, On Tue, 2016-05-31 at 14:07 +0300, Sergei Shtylyov wrote: > Hello. > > On 5/31/2016 8:52 AM, Chunfeng Yun wrote: > > > > > Signed-off-by: Chunfeng Yun > > --- > > .../devicetree/bindings/usb/mt8173-xhci.txt| 48 > > > > 1 file changed, 48 insertions(+) > > >

Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends into asm-generic/barrier.h

2016-06-01 Thread Peter Zijlstra
On Wed, Jun 01, 2016 at 01:00:10PM +0100, Will Deacon wrote: > On Wed, Jun 01, 2016 at 11:31:58AM +0200, Peter Zijlstra wrote: > > Will, since ARM64 seems to want to use this, does the below make sense > > to you? > > Not especially -- I was going to override smp_cond_load_acquire anyway > because

[PATCH 7/7] KVM: x86: protect KVM_CREATE_PIT/KVM_CREATE_PIT2 with kvm->lock

2016-06-01 Thread Paolo Bonzini
The syzkaller folks reported a NULL pointer dereference that seems to be cause by a race between KVM_CREATE_IRQCHIP and KVM_CREATE_PIT2. The former takes kvm->lock (except when registering the devices, which needs kvm->slots_lock); the latter takes kvm->slots_lock only. Change KVM_CREATE_PIT2 to fo

[PATCH 0/7] KVM: syzkaller fixes

2016-06-01 Thread Paolo Bonzini
These fix most of the bugs reported by Dmitry Vyukov a while back. I couldn't reproduce one of the bugs (patch 7) but the fix is easy. Probably, more VM ioctls should take kvm->lock, but I have not looked at it yet. I have only marked for stable the two patches that fix an oops. However, all of p

[PATCH 2/7] KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID

2016-06-01 Thread Paolo Bonzini
This causes an ugly dmesg splat. Beautified syzkaller testcase: #include #include #include #include #include long r[8]; int main() { struct kvm_cpuid2 c = { 0 }; r[2] = open("/dev/kvm", O_RDWR); r[3] = ioctl(r[2], KVM_CREATE_VM, 0);

[PATCH 3/7] KVM: fail KVM_SET_VCPU_EVENTS with invalid exception number

2016-06-01 Thread Paolo Bonzini
This cannot be returned by KVM_GET_VCPU_EVENTS, so it is okay to return EINVAL. It causes a WARN from exception_type: WARNING: CPU: 3 PID: 16732 at arch/x86/kvm/x86.c:345 exception_type+0x49/0x50 [kvm]() CPU: 3 PID: 16732 Comm: a.out Tainted: GW 4.4.6-300.fc23.x86_64 #1

[PATCH 6/7] KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS

2016-06-01 Thread Paolo Bonzini
MOV to DR6 or DR7 causes a #GP if an attempt is made to write a 1 to any of bits 63:32. However, this is not detected at KVM_SET_DEBUGREGS time, and the next KVM_RUN oopses: general protection fault: [#1] SMP CPU: 2 PID: 14987 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1 Hardwar

Re: [PATCH v3 09/12] EXAMPLE CODE: usb: port: Parse pwrseq phandle from Device Tree

2016-06-01 Thread Peter Chen
On Wed, Jun 01, 2016 at 01:57:23AM -0700, Stephen Boyd wrote: > Quoting Krzysztof Kozlowski (2016-06-01 01:02:18) > > Parse usb-pwrseq property from Device Tree to get the phandle to pwrseq > > device. The pwrseq device will be used by USB hub to cycle the power > > before activating ports. > > >

[PATCH 5/7] KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID

2016-06-01 Thread Paolo Bonzini
This causes an ugly dmesg splat. Beautified syzkaller testcase: #include #include #include #include #include long r[8]; int main() { struct kvm_irq_routing ir = { 0 }; r[2] = open("/dev/kvm", O_RDWR); r[3] = ioctl(r[2], KVM_CREATE_VM,

[PATCH 1/7] kvm: x86: avoid warning on repeated KVM_SET_TSS_ADDR

2016-06-01 Thread Paolo Bonzini
Found by syzkaller: WARNING: CPU: 3 PID: 15175 at arch/x86/kvm/x86.c:7705 __x86_set_memory_region+0x1dc/0x1f0 [kvm]() CPU: 3 PID: 15175 Comm: a.out Tainted: GW 4.4.6-300.fc23.x86_64 #1 Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012

[PATCH 4/7] KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi

2016-06-01 Thread Paolo Bonzini
Found by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 0120 IP: [] kvm_irq_map_gsi+0x12/0x90 [kvm] PGD 6f80b067 PUD b6535067 PMD 0 Oops: [#1] SMP CPU: 3 PID: 4988 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1 [...] Call Trace:

Re: [PATCH -v3 7/8] locking: Move smp_cond_load_acquire() and friends into asm-generic/barrier.h

2016-06-01 Thread Will Deacon
On Wed, Jun 01, 2016 at 02:06:54PM +0200, Peter Zijlstra wrote: > On Wed, Jun 01, 2016 at 01:00:10PM +0100, Will Deacon wrote: > > On Wed, Jun 01, 2016 at 11:31:58AM +0200, Peter Zijlstra wrote: > > > Will, since ARM64 seems to want to use this, does the below make sense > > > to you? > > > > Not

Re: [PATCH] rtc: ds1307: Fix relying on reset value for weekday

2016-06-01 Thread Alexandre Belloni
Hi, On 01/06/2016 at 16:19:07 +0530, Keerthy wrote : > The reset value of weekday is 0x1. This is wrong since > the reset values of the day/month/year make up to Jan 1 2001. > When computed weekday comes out to be Monday. On a scale > of 1-7(Sunday - Saturday) it should be 0x2. So we should not >

Re: [PATCH v3 2/5] sched/fair: Skip detach and attach new group task

2016-06-01 Thread Vincent Guittot
On 1 June 2016 at 05:41, Yuyang Du wrote: > Vincent reported that the first task to a new task group's cfs_rq will > be attached in attach_task_cfs_rq() and once more when it is enqueued > (see https://lkml.org/lkml/2016/5/25/388). > > Actually, it is much worse. The load is currently attached mos

Re: [PATCH 2/2] pci: Add PCIe driver for Rockchip Soc

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 5:57:25 PM CEST Shawn Lin wrote: > yes, that is what we need and we believe other host bridges have > this requirements. With your patch applied, we only need to > implement our map0 callback here. Thanks for improving it. > > BTW, would you mind that we pack your patch

Re: [PATCH v3 4/5] sched/fair: Move load and util avgs from wake_up_new_task() to sched_fork()

2016-06-01 Thread Vincent Guittot
On 1 June 2016 at 05:41, Yuyang Du wrote: > Move new task initialization to sched_fork(). For initial non-fair class > task, the first switched_to_fair() will do the attach correctly. Not sure to catch the explanation. you have only moved and renamed init_entity_runnable_average but you speak abo

Re: [PATCH v3 1/2] iommu: Disable preemption around use of this_cpu_ptr()

2016-06-01 Thread Joonas Lahtinen
On ke, 2016-06-01 at 12:10 +0100, Chris Wilson wrote: > Between acquiring the this_cpu_ptr() and using it, ideally we don't want > to be preempted and work on another CPU's private data. this_cpu_ptr() > checks whether or not preemption is disable, and get_cpu_ptr() provides > a convenient wrapper

Re: The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management

2016-06-01 Thread Mikulas Patocka
On Tue, 31 May 2016, Vlastimil Babka wrote: > On 05/31/2016 11:20 PM, Mikulas Patocka wrote: > > Hi > > > > The patch c33d6c06f60f710f0305ae792773e1c2560e1e51 ("mm, page_alloc: avoid > > looking up the first zone in a zonelist twice") breaks memory management > > on PA-RISC. > > Hi, > > I t

Re: [RFC PATCH] sched: fix hierarchical order in rq->leaf_cfs_rq_list

2016-06-01 Thread Peter Zijlstra
On Tue, May 24, 2016 at 11:55:10AM +0200, Vincent Guittot wrote: > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 218f8e8..6d3fbf2 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -290,15 +290,31 @@ static inline void list_add_leaf_cfs_rq(struct cfs_rq > *cfs_rq)

Re: [PATCH] lib/uuid.c: eliminate uuid_[bl]e_index arrays

2016-06-01 Thread Andy Shevchenko
On Tue, 2016-05-31 at 14:36 -0700, Joe Perches wrote: > On Tue, 2016-05-31 at 16:31 -0400, George Spelvin wrote: > > Here's a patch implementing the suggestion I made earlier.  This > > reduces > > code size, data size, and run time for input and output of UUIDs. > [] > > diff --git a/lib/uuid.c b/

[PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops

2016-06-01 Thread Arnd Bergmann
A lot of PCI host bridges require different methods for initiating type 0 and type 1 config space accesses, leading to duplication of code. This adds support for the two different kinds at the pci_ops level, with the newly added map_bridge/read_bridge/write_bridge operations for type 1 accesses.

[PATCH 3/3] pci: mvebu: use bridge config operations

2016-06-01 Thread Arnd Bergmann
This converts the pci-mvebu host driver to use the newly added pci_ops callbacks for handling the host config space. After support for the emulator root bridge is removed, the normal operations can use pci_generic_config_read/pci_generic_config_write and we just need to provide a map_bus callback.

[PATCH 2/3] pci: dw: use new config space accessors

2016-06-01 Thread Arnd Bergmann
The PCI core can now use separate callbacks for type 1 config space accesses, so we can simplify the dw_pcie_wr_conf/dw_pcie_rd_conf logic that multiplexes between the two kinds. Signed-off-by: Arnd Bergmann --- drivers/pci/host/pcie-designware.c | 73 +++--- 1 fi

[PATCH 0/2] KVM: x86: avoid simultaneous queueing of both IRQ and SMI

2016-06-01 Thread Paolo Bonzini
This was reported as a vmentry failure while running Windows with SMM enabled. It's not that rare if your processor lacks APICv---it happens about 20-30% of the time while installing Windows 10. I now understand the interrupt injection code (especially complete_interrupts) better, and I also unde

[PATCH 2/2] KVM: x86: rename process_smi to enter_smm, process_smi_request to process_smi

2016-06-01 Thread Paolo Bonzini
Make the functions more similar between KVM_REQ_NMI and KVM_REQ_SMI. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/x86.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 271585574a9f..199

[PATCH 1/2] KVM: x86: avoid simultaneous queueing of both IRQ and SMI

2016-06-01 Thread Paolo Bonzini
If the processor exits to KVM while delivering an interrupt, the hypervisor then requeues the interrupt for the next vmentry. Trying to enter SMM in this same window causes to enter non-root mode in emulated SMM (i.e. with IF=0) and with a request to inject an IRQ (i.e. with a valid VM-entry interr

Re: [PATCH v3 2/2] iommu: Remove cpu-local spinlock

2016-06-01 Thread Joonas Lahtinen
On ke, 2016-06-01 at 12:10 +0100, Chris Wilson wrote: > By avoiding cross-CPU usage of the per-cpu iova cache, we can forgo > having a spinlock inside the per-cpu struct. The only place where we > actually may touch another CPU's data is when performing a cache flush > after running out of memory.

Re: [PATCH] rtc: ds1307: Fix relying on reset value for weekday

2016-06-01 Thread Keerthy
On Wednesday 01 June 2016 05:48 PM, Alexandre Belloni wrote: Hi, On 01/06/2016 at 16:19:07 +0530, Keerthy wrote : The reset value of weekday is 0x1. This is wrong since the reset values of the day/month/year make up to Jan 1 2001. When computed weekday comes out to be Monday. On a scale of 1-

[PATCH v10 1/4] dt/bindings: add bindings for optee

2016-06-01 Thread Jens Wiklander
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 ch

[PATCH] mmc: dw_mmc: k3: add MMC_CAP_CMD23

2016-06-01 Thread Jerome Forissier
Enables RPMB support for the on-board eMMC of the HiKey board as well as for eMMC modules connected to the microSD slot. Signed-off-by: Jerome Forissier --- drivers/mmc/host/dw_mmc-k3.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_

[PATCH v10 0/4] generic TEE subsystem

2016-06-01 Thread Jens Wiklander
Hi, [TL;DR; This patch set needs more review, if you're using OP-TEE please help reviewing.] This patch set introduces a generic TEE subsystem. The TEE subsystem will contain drivers for various TEE implementations. A TEE (Trusted Execution Environment) is a trusted OS running in some secure envi

Re: [PATCH v6 0/8] block: prepare for multipage bvecs

2016-06-01 Thread Ming Lei
On Tue, May 31, 2016 at 11:53 PM, Mike Snitzer wrote: > On Mon, May 30 2016 at 9:34am -0400, > Ming Lei wrote: > >> >> Hi, >> >> Interests[1] have been shown in multipage bvecs, so this patchset >> try to prepare for the support and do two things: >> >> 1) the 1st 4 patches use bvec iterator to

[PATCH v10 2/4] tee: generic TEE subsystem

2016-06-01 Thread Jens Wiklander
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) d

Re: [PATCH 0/5] *** rtl8192e: Replace semaphore with mutex ***

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 2:56:51 PM CEST Binoy Jayan wrote: > Resending the same patchset by adding the following lists: > de...@driverdev.osuosl.org > linux-kernel@vger.kernel.org > > Hi, > > These are a set of patches towards the removing semaphores. > They build correctly (individually a

[PATCH v10 3/4] tee: add OP-TEE driver

2016-06-01 Thread Jens Wiklander
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 communi

[PATCH v10 4/4] Documentation: tee subsystem and op-tee driver

2016-06-01 Thread Jens Wiklander
Acked-by: Andreas Dannenberg Signed-off-by: Jens Wiklander --- Documentation/00-INDEX | 2 + Documentation/tee.txt | 118 + MAINTAINERS| 1 + 3 files changed, 121 insertions(+) create mode 100644 Documentation/tee.txt diff --git

<    1   2   3   4   5   6   7   8   9   10   >