deliverable/linux.git
7 years agotracing: extend sched_pi_setprio sched_update_prio
Julien Desfossez [Thu, 15 Sep 2016 14:49:57 +0000 (10:49 -0400)] 
tracing: extend sched_pi_setprio

Use the TRACE_EVENT_MAP macro to extend the sched_pi_setprio into
sched_pi_update_prio. The pre-existing event is untouched. This gets rid
of the old/new prio fields, and instead outputs the scheduling update
based on the top waiter of the rtmutex.

Boosting:
sched_pi_update_prio: comm=lowprio1, pid=3818, old_policy=SCHED_NORMAL,
old_nice=0, old_rt_priority=0, old_dl_runtime=0,
old_dl_deadline=0, old_dl_period=0, top_waiter_comm=highprio0,
top_waiter_pid=3820, new_policy=SCHED_FIFO, new_nice=0,
new_rt_priority=90, new_dl_runtime=0, new_dl_deadline=0,
new_dl_period=0

Unboosting:
sched_pi_update_prio: comm=lowprio1, pid=3818, old_policy=SCHED_FIFO,
old_nice=0, old_rt_priority=90, old_dl_runtime=0, old_dl_deadline=0,
old_dl_period=0, top_waiter_comm=, top_waiter_pid=-1,
new_policy=SCHED_NORMAL, new_nice=0, new_rt_priority=0,
new_dl_runtime=0, new_dl_deadline=0, new_dl_period=0

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agotracing: extend scheduling tracepoints
Julien Desfossez [Mon, 12 Sep 2016 16:44:39 +0000 (12:44 -0400)] 
tracing: extend scheduling tracepoints

Create alternate versions of the sched_switch, sched_waking and
sched_process_fork tracepoint probes to output priority-related fields
and PI top-waiter if any.

This uses the TRACE_EVENT_MAP macro, so the instrumented code and the
already existing tracepoints are untouched.

We only expose the priority-related fields visible from userspace,
leaving out the "prio" value which should really be a kernel-internal
representation of the task priority, and must be expected to be
eventually deprecated. The values output are the effective values, not
necessarily the normal values.

We also output the comm and PID of the process blocked by the task if it
is in a PI situation. These fields allow to quickly identify the PI
situations without requiring to keep track of all the
sched_pi_setprio/sched_pi_update_prio events and state.

The values traced are the effective values, which may differ from the
thread normal values in PI scenarios.

Here is an example of the output from these new probes:
sched_process_fork_prio: comm=bash, pid=1988, child_comm=bash,
child_pid=2129, child_policy=SCHED_NORMAL, child_nice=0,
child_rt_priority=0, child_dl_runtime=0,
child_dl_deadline=0, child_dl_period=0

No PI:
sched_switch_prio: prev_comm=swapper/6, prev_pid=0, prev_policy=SCHED_NORMAL,
prev_nice=0, prev_rt_priority=0, prev_dl_runtime=0,
prev_dl_deadline=0, prev_dl_period=0, prev_state=R,
prev_top_waiter_comm=, prev_top_waiter_pid=-1 ==>
next_comm=bash, next_pid=3817, next_policy=SCHED_NORMAL,
next_nice=0, next_rt_priority=0, next_dl_runtime=0,
next_dl_deadline=0, next_dl_period=0, next_top_waiter_comm=,
next_top_waiter_pid=-1

sched_waking_prio: comm=migration/6, pid=38, target_cpu=006,
policy=SCHED_FIFO, nice=0, rt_priority=99, dl_runtime=0,
dl_deadline=0, dl_period=0, top_waiter_comm=, top_waiter_pid=-1

PI:
sched_switch_prio: prev_comm=swapper/1, prev_pid=0, prev_policy=SCHED_NORMAL,
prev_nice=0, prev_rt_priority=0, prev_dl_runtime=0,
prev_dl_deadline=0, prev_dl_period=0, prev_state=R,
prev_top_waiter_comm=, prev_top_waiter_pid=-1 ==>
next_comm=lowprio1, next_pid=3818, next_policy=SCHED_NORMAL,
next_nice=0, next_rt_priority=90, next_dl_runtime=0,
next_dl_deadline=0, next_dl_period=0,
next_top_waiter_comm=highprio0, next_top_waiter_pid=3820

sched_waking_prio: comm=lowprio1, pid=3818, target_cpu=001, policy=SCHED_FIFO,
  nice=0, rt_priority=90, dl_runtime=0, dl_deadline=0,
  dl_period=0, top_waiter_comm=highprio0, top_waiter_pid=3820

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agotracing: add TRACE_EVENT_MAP
Julien Desfossez [Fri, 9 Sep 2016 22:16:13 +0000 (18:16 -0400)] 
tracing: add TRACE_EVENT_MAP

This macro allows to create an alias of an existing TRACE_EVENT. A
TRACE_EVENT_MAP connects a new probe to an existing tracepoint, so we
can use it to create another output of the same tracepoint without
changing the instrumented code.

This allows to create alternate versions of existing tracepoints to
output more/other fields only in specific use-cases and not all the time
(which could break existing tools and/or bloat the trace with too many
useless fields).

The usage is the same as the TRACE_EVENT macro with the addition of the
"map" parameter which is the name of the alias, the "name" field is the
name of the original tracepoint:
TRACE_EVENT_MAP(name, map, proto, args, tstruct, assign, print)
DEFINE_EVENT_MAP(template, name, map, proto, args)

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agotracing: add sched_update_prio
Julien Desfossez [Tue, 28 Jun 2016 20:31:12 +0000 (16:31 -0400)] 
tracing: add sched_update_prio

This tracepoint allows to keep track of all explicit priority changes of
a task. It outputs the scheduling policy, the nice value, the
rt_priority and the deadline-related attributes (dl_runtime, dl_deadline
and dl_period).

It is emitted in the code path of the sched_setscheduler, sched_setattr,
sched_setparam, and nice system calls.

This allows the analysis of real-time scheduling delays based on the
configured scheduling priorities and policies, which cannot be performed
with the current instrumentation in sched_switch. Also, instead of
exposing the internal kernel prio field, this tracepoint only outputs
the user-visible priority attributes.

The effective priority of running threads can also be temporarily
changed in the PI code, but a dedicated tracepoint is already in place
to cover this case.

Here are a few output examples:
After fork of a normal task:
sched_update_prio: comm=bash pid=2104, policy=SCHED_NORMAL, nice=0,
rt_priority=0, dl_runtime=0, dl_deadline=0, dl_period=0

renice -n 10 of a normal task:
sched_update_prio: comm=sleep pid=2130, policy=SCHED_NORMAL, nice=10,
rt_priority=0, dl_runtime=0, dl_deadline=0, dl_period=0

SCHED_FIFO 60:
sched_update_prio: comm=chrt pid=2105, policy=SCHED_FIFO, nice=0,
rt_priority=60, dl_runtime=0, dl_deadline=0, dl_period=0

SCHED_RR 60:
sched_update_prio: comm=chrt pid=2109, policy=SCHED_RR, nice=0,
rt_priority=60, dl_runtime=0, dl_deadline=0, dl_period=0

SCHED_DEADLINE:
sched_update_prio: comm=b pid=2110, policy=SCHED_DEADLINE, nice=0,
rt_priority=0, dl_runtime=10000000, dl_deadline=30000000,
dl_period=30000000

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agosched: get effective policy and rt_prio
Julien Desfossez [Fri, 16 Sep 2016 19:22:17 +0000 (15:22 -0400)] 
sched: get effective policy and rt_prio

Helper functions to get the effective policy and rt_priority from the
prio and policy values. This is useful in PI situations because these
fields are not updated in the task, only the sched_class is temporarily
modified.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agosched/fair: check_preempt_wakeup: Fix assumption on the default policy
Julien Desfossez [Fri, 16 Sep 2016 16:16:36 +0000 (12:16 -0400)] 
sched/fair: check_preempt_wakeup: Fix assumption on the default policy

Tasks with RT or deadline scheduling class may inherit from a task with
a "fair" scheduling class. This priority inheritance changes the
scheduling class, but not the task "policy" field.

Therefore, the fair scheduler should not assume that policy !=
SCHED_NORMAL is the same as (policy == SCHED_BATCH || policy ==
SCHED_IDLE), because the policy could also be SCHED_RR, SCHED_FIFO, or
SCHED_DEADLINE.

The incorrect comparison in check_preempt_wakeup makes RR, FIFO and
DEADLINE tasks which inherit from a fair task behave as if they were
IDLE or BATCH tasks, thus awaiting the following tick before preempting
the current task.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
7 years agoAdd linux-next specific files for 20160913
Stephen Rothwell [Tue, 13 Sep 2016 04:16:52 +0000 (14:16 +1000)] 
Add linux-next specific files for 20160913

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
7 years agoMerge branch 'akpm/master'
Stephen Rothwell [Tue, 13 Sep 2016 03:57:12 +0000 (13:57 +1000)] 
Merge branch 'akpm/master'

7 years agohung_task-allow-hung_task_panic-when-hung_task_warnings-is-0-fix
Andrew Morton [Sat, 10 Sep 2016 10:36:37 +0000 (20:36 +1000)] 
hung_task-allow-hung_task_panic-when-hung_task_warnings-is-0-fix

fix off-by-one

Cc: John Siddle <jsiddle@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agohung_task: allow hung_task_panic when hung_task_warnings is 0
John Siddle [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
hung_task: allow hung_task_panic when hung_task_warnings is 0

Previously hung_task_panic would not be respected if enabled after
hung_task_warnings had already been decremented to 0.

Permit the kernel to panic if hung_task_panic is enabled after
hung_task_warnings has already been decremented to 0 and another task
hangs for hung_task_timeout_secs seconds.

Check if hung_task_panic is enabled so we don't return prematurely, and
check if hung_task_warnings is non-zero so we don't print the warning
unnecessarily.

Link: http://lkml.kernel.org/r/1473450214-4049-1-git-send-email-jsiddle@redhat.com
Signed-off-by: John Siddle <jsiddle@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: add kerneldoc for kthread_create()
Jonathan Corbet [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
kthread: add kerneldoc for kthread_create()

This macro is referenced in other kerneldoc comments, but lacks one of its
own; fix that.

Link: http://lkml.kernel.org/r/20160826072313.726a3485@lwn.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Reported-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: better support freezable kthread workers
Petr Mladek [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
kthread: better support freezable kthread workers

This patch allows to make kthread worker freezable via a new @flags
parameter. It will allow to avoid an init work in some kthreads.

It currently does not affect the function of kthread_worker_fn()
but it might help to do some optimization or fixes eventually.

I currently do not know about any other use for the @flags
parameter but I believe that we will want more flags
in the future.

Finally, I hope that it will not cause confusion with @flags member
in struct kthread. Well, I guess that we will want to rework the
basic kthreads implementation once all kthreads are converted into
kthread workers or workqueues. It is possible that we will merge
the two structures.

Link: http://lkml.kernel.org/r/1470754545-17632-12-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: allow to modify delayed kthread work
Petr Mladek [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
kthread: allow to modify delayed kthread work

There are situations when we need to modify the delay of a delayed kthread
work. For example, when the work depends on an event and the initial delay
means a timeout. Then we want to queue the work immediately when the event
happens.

This patch implements kthread_mod_delayed_work() as inspired workqueues.
It cancels the timer, removes the work from any worker list and queues it
again with the given timeout.

A very special case is when the work is being canceled at the same time.
It might happen because of the regular kthread_cancel_delayed_work_sync()
or by another kthread_mod_delayed_work(). In this case, we do nothing and
let the other operation win. This should not normally happen as the caller
is supposed to synchronize these operations a reasonable way.

Link: http://lkml.kernel.org/r/1470754545-17632-11-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: allow to cancel kthread work
Petr Mladek [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
kthread: allow to cancel kthread work

We are going to use kthread workers more widely and sometimes we will need
to make sure that the work is neither pending nor running.

This patch implements cancel_*_sync() operations as inspired by
workqueues.  Well, we are synchronized against the other operations via
the worker lock, we use del_timer_sync() and a counter to count parallel
cancel operations.  Therefore the implementation might be easier.

First, we check if a worker is assigned.  If not, the work has newer been
queued after it was initialized.

Second, we take the worker lock.  It must be the right one.  The work must
not be assigned to another worker unless it is initialized in between.

Third, we try to cancel the timer when it exists.  The timer is deleted
synchronously to make sure that the timer call back is not running.  We
need to temporary release the worker->lock to avoid a possible deadlock
with the callback.  In the meantime, we set work->canceling counter to
avoid any queuing.

Fourth, we try to remove the work from a worker list. It might be
the list of either normal or delayed works.

Fifth, if the work is running, we call kthread_flush_work().  It might
take an arbitrary time.  We need to release the worker-lock again.  In the
meantime, we again block any queuing by the canceling counter.

As already mentioned, the check for a pending kthread work is done under a
lock.  In compare with workqueues, we do not need to fight for a single
PENDING bit to block other operations.  Therefore we do not suffer from
the thundering storm problem and all parallel canceling jobs might use
kthread_flush_work().  Any queuing is blocked until the counter gets zero.

Link: http://lkml.kernel.org/r/1470754545-17632-10-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: initial support for delayed kthread work
Petr Mladek [Sat, 10 Sep 2016 10:36:36 +0000 (20:36 +1000)] 
kthread: initial support for delayed kthread work

We are going to use kthread_worker more widely and delayed works
will be pretty useful.

The implementation is inspired by workqueues.  It uses a timer to queue
the work after the requested delay.  If the delay is zero, the work is
queued immediately.

In compare with workqueues, each work is associated with a single worker
(kthread).  Therefore the implementation could be much easier.  In
particular, we use the worker->lock to synchronize all the operations with
the work.  We do not need any atomic operation with a flags variable.

In fact, we do not need any state variable at all.  Instead, we add a list
of delayed works into the worker.  Then the pending work is listed either
in the list of queued or delayed works.  And the existing check of pending
works is the same even for the delayed ones.

A work must not be assigned to another worker unless reinitialized.
Therefore the timer handler might expect that dwork->work->worker is valid
and it could simply take the lock.  We just add some sanity checks to help
with debugging a potential misuse.

Link: http://lkml.kernel.org/r/1470754545-17632-9-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: detect when a kthread work is used by more workers
Petr Mladek [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
kthread: detect when a kthread work is used by more workers

Nothing currently prevents a work from queuing for a kthread worker when
it is already running on another one.  This means that the work might run
in parallel on more than one worker.  Also some operations are not
reliable, e.g.  flush.

This problem will be even more visible after we add kthread_cancel_work()
function.  It will only have "work" as the parameter and will use
worker->lock to synchronize with others.

Well, normally this is not a problem because the API users are sane.
But bugs might happen and users also might be crazy.

This patch adds a warning when we try to insert the work for another
worker.  It does not fully prevent the misuse because it would make the
code much more complicated without a big benefit.

It adds the same warning also into kthread_flush_work() instead of the
repeated attempts to get the right lock.

A side effect is that one needs to explicitly reinitialize the work if it
must be queued into another worker.  This is needed, for example, when the
worker is stopped and started again.  It is a bit inconvenient.  But it
looks like a good compromise between the stability and complexity.

I have double checked all existing users of the kthread worker API and
they all seems to initialize the work after the worker gets started.

Just for completeness, the patch adds a check that the work is not already
in a queue.

The patch also puts all the checks into a separate function.  It will be
reused when implementing delayed works.

Link: http://lkml.kernel.org/r/1470754545-17632-8-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: add kthread_destroy_worker()
Petr Mladek [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
kthread: add kthread_destroy_worker()

The current kthread worker users call flush() and stop() explicitly.
This function does the same plus it frees the kthread_worker struct
in one call.

It is supposed to be used together with kthread_create_worker*() that
allocates struct kthread_worker.

Link: http://lkml.kernel.org/r/1470754545-17632-7-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: add kthread_create_worker*()
Petr Mladek [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
kthread: add kthread_create_worker*()

Kthread workers are currently created using the classic kthread API,
namely kthread_run().  kthread_worker_fn() is passed as the @threadfn
parameter.

This patch defines kthread_create_worker() and
kthread_create_worker_on_cpu() functions that hide implementation details.

They enforce using kthread_worker_fn() for the main thread.  But I doubt
that there are any plans to create any alternative.  In fact, I think that
we do not want any alternative main thread because it would be hard to
support consistency with the rest of the kthread worker API.

The naming and function of kthread_create_worker() is inspired by the
workqueues API like the rest of the kthread worker API.

The kthread_create_worker_on_cpu() variant is motivated by the original
kthread_create_on_cpu().  Note that we need to bind per-CPU kthread
workers already when they are created.  It makes the life easier.
kthread_bind() could not be used later for an already running worker.

This patch does _not_ convert existing kthread workers.  The kthread
worker API need more improvements first, e.g.  a function to destroy the
worker.

IMPORTANT:

kthread_create_worker_on_cpu() allows to use any format of the worker
name, in compare with kthread_create_on_cpu().  The good thing is that it
is more generic.  The bad thing is that most users will need to pass the
cpu number in two parameters, e.g.  kthread_create_worker_on_cpu(cpu,
"helper/%d", cpu).

To be honest, the main motivation was to avoid the need for an empty
va_list.  The only legal way was to create a helper function that would be
called with an empty list.  Other attempts caused compilation warnings or
even errors on different architectures.

There were also other alternatives, for example, using #define or
splitting __kthread_create_worker().  The used solution looked like the
least ugly.

Link: http://lkml.kernel.org/r/1470754545-17632-6-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: allow to call __kthread_create_on_node() with va_list args
Petr Mladek [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
kthread: allow to call __kthread_create_on_node() with va_list args

kthread_create_on_node() implements a bunch of logic to create the
kthread.  It is already called by kthread_create_on_cpu().

We are going to extend the kthread worker API and will need to call
kthread_create_on_node() with va_list args there.

This patch does only a refactoring and does not modify the existing
behavior.

Link: http://lkml.kernel.org/r/1470754545-17632-5-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread/smpboot: do not park in kthread_create_on_cpu()
Petr Mladek [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
kthread/smpboot: do not park in kthread_create_on_cpu()

kthread_create_on_cpu() was added by the commit 2a1d446019f9a5983e
("kthread: Implement park/unpark facility").  It is currently used only
when enabling new CPU.  For this purpose, the newly created kthread has to
be parked.

The CPU binding is a bit tricky.  The kthread is parked when the CPU has
not been allowed yet.  And the CPU is bound when the kthread is unparked.

The function would be useful for more per-CPU kthreads, e.g.
bnx2fc_thread, fcoethread.  For this purpose, the newly created kthread
should stay in the uninterruptible state.

This patch moves the parking into smpboot.  It binds the thread already
when created.  Then the function might be used universally.  Also the
behavior is consistent with kthread_create() and kthread_create_on_node().

Link: http://lkml.kernel.org/r/1470754545-17632-4-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agocrypto: engine: fix linux-next merge conflict
Arnd Bergmann [Sat, 10 Sep 2016 10:36:35 +0000 (20:36 +1000)] 
crypto: engine: fix linux-next merge conflict

A merge conflict between the akpm-current tree and the crypto tree
caused a build failure in ARM allmodconfig today:

crypto/crypto_engine.c: In function 'crypto_transfer_hash_request':
crypto/crypto_engine.c:234:3: error: implicit declaration of function 'queue_kthread_work' [-Werror=implicit-function-declaration]

This adapts the crypto code to the API change.

Fixes: 4cba7cf025f3 ("crypto: engine - permit to enqueue ashash_request")
Fixes: 8ca76638a2d0 ("kthread: kthread worker API cleanup")
Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: kthread worker API cleanup
Petr Mladek [Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)] 
kthread: kthread worker API cleanup

A good practice is to prefix the names of functions by the name
of the subsystem.

The kthread worker API is a mix of classic kthreads and workqueues.  Each
worker has a dedicated kthread.  It runs a generic function that process
queued works.  It is implemented as part of the kthread subsystem.

This patch renames the existing kthread worker API to use
the corresponding name from the workqueues API prefixed by
kthread_:

__init_kthread_worker() -> __kthread_init_worker()
init_kthread_worker() -> kthread_init_worker()
init_kthread_work() -> kthread_init_work()
insert_kthread_work() -> kthread_insert_work()
queue_kthread_work() -> kthread_queue_work()
flush_kthread_work() -> kthread_flush_work()
flush_kthread_worker() -> kthread_flush_worker()

Note that the names of DEFINE_KTHREAD_WORK*() macros stay
as they are. It is common that the "DEFINE_" prefix has
precedence over the subsystem names.

Note that INIT() macros and init() functions use different
naming scheme. There is no good solution. There are several
reasons for this solution:

  + "init" in the function names stands for the verb "initialize"
    aka "initialize worker". While "INIT" in the macro names
    stands for the noun "INITIALIZER" aka "worker initializer".

  + INIT() macros are used only in DEFINE() macros

  + init() functions are used close to the other kthread()
    functions. It looks much better if all the functions
    use the same scheme.

  + There will be also kthread_destroy_worker() that will
    be used close to kthread_cancel_work(). It is related
    to the init() function. Again it looks better if all
    functions use the same naming scheme.

  + there are several precedents for such init() function
    names, e.g. amd_iommu_init_device(), free_area_init_node(),
    jump_label_init_type(),  regmap_init_mmio_clk(),

  + It is not an argument but it was inconsistent even before.

Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokthread: rename probe_kthread_data() to kthread_probe_data()
Petr Mladek [Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)] 
kthread: rename probe_kthread_data() to kthread_probe_data()

Patch series "kthread: Kthread worker API improvements"

The intention of this patchset is to make it easier to manipulate and
maintain kthreads.  Especially, I want to replace all the custom main
cycles with a generic one.  Also I want to make the kthreads sleep in a
consistent state in a common place when there is no work.

This patch (of 11):

A good practice is to prefix the names of functions by the name of the
subsystem.

This patch fixes the name of probe_kthread_data().  The other wrong
functions names are part of the kthread worker API and will be fixed
separately.

Link: http://lkml.kernel.org/r/1470754545-17632-2-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agoscripts/tags.sh: enable code completion in VIM
Mathieu Maret [Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)] 
scripts/tags.sh: enable code completion in VIM

Vim, with the omnicppcomplete(#1) plugin, can do code completion using
information build by ctags.  Add flags needed by omnicppcomplete(#2) to
have completion on member of structure.

1: https://github.com/vim-scripts/omnicppcomplete
2: https://github.com/vim-scripts/OmniCppComplete/blob/master/doc/omnicppcomplete.txt#L93

Link: http://lkml.kernel.org/r/20160830191546.4469-1-mathieu.maret@gmail.com
Signed-off-by: Mathieu Maret <mathieu.maret@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agomm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping
Catalin Marinas [Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)] 
mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping

Some of the kmemleak_*() callbacks in memblock, bootmem, CMA convert a
physical address to a virtual one using __va().  However, such physical
addresses may sometimes be located in highmem and using __va() is
incorrect, leading to inconsistent object tracking in kmemleak.

The following functions have been added to the kmemleak API and they take
a physical address as the object pointer.  They only perform the
corresponding action if the address has a lowmem mapping:

kmemleak_alloc_phys
kmemleak_free_part_phys
kmemleak_not_leak_phys
kmemleak_ignore_phys

The affected calling places have been updated to use the new kmemleak
API.

Link: http://lkml.kernel.org/r/1471531432-16503-1-git-send-email-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agokdump, vmcoreinfo: report memory sections virtual addresses
Thomas Garnier [Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)] 
kdump, vmcoreinfo: report memory sections virtual addresses

KASLR memory randomization can randomize the base of the physical memory
mapping (PAGE_OFFSET), vmalloc (VMALLOC_START) and vmemmap
(VMEMMAP_START).  Adding these variables on VMCOREINFO so tools can easily
identify the base of each memory section.

Link: http://lkml.kernel.org/r/1471531632-23003-1-git-send-email-thgarnie@google.com
Signed-off-by: Thomas Garnier <thgarnie@google.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Xunlei Pang <xlpang@redhat.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Eugene Surovegin <surovegin@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agoinclude/linux/mlx5/device.h: kill BUILD_BUG_ON()s
Andrew Morton [Sat, 10 Sep 2016 10:36:33 +0000 (20:36 +1000)] 
include/linux/mlx5/device.h: kill BUILD_BUG_ON()s

these go splat for me

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agodrivers/net/wireless/intel/iwlwifi/dvm/calib.c: simplfy min() expression
Andrew Morton [Sat, 10 Sep 2016 10:36:33 +0000 (20:36 +1000)] 
drivers/net/wireless/intel/iwlwifi/dvm/calib.c: simplfy min() expression

This cast is no longer needed.

Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Intel Linux Wireless <linuxwifi@intel.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agoMerge branch 'akpm-current/current'
Stephen Rothwell [Tue, 13 Sep 2016 03:47:33 +0000 (13:47 +1000)] 
Merge branch 'akpm-current/current'

7 years agoMerge remote-tracking branch 'nvdimm/libnvdimm-for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:29:36 +0000 (13:29 +1000)] 
Merge remote-tracking branch 'nvdimm/libnvdimm-for-next'

7 years agoMerge remote-tracking branch 'rtc/rtc-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:28:00 +0000 (13:28 +1000)] 
Merge remote-tracking branch 'rtc/rtc-next'

7 years agoMerge remote-tracking branch 'coresight/next'
Stephen Rothwell [Tue, 13 Sep 2016 03:26:28 +0000 (13:26 +1000)] 
Merge remote-tracking branch 'coresight/next'

7 years agoMerge remote-tracking branch 'livepatching/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:24:55 +0000 (13:24 +1000)] 
Merge remote-tracking branch 'livepatching/for-next'

7 years agoMerge remote-tracking branch 'y2038/y2038'
Stephen Rothwell [Tue, 13 Sep 2016 03:23:17 +0000 (13:23 +1000)] 
Merge remote-tracking branch 'y2038/y2038'

7 years agoMerge remote-tracking branch 'clk/clk-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:17:55 +0000 (13:17 +1000)] 
Merge remote-tracking branch 'clk/clk-next'

7 years agoMerge remote-tracking branch 'dma-buf/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:17:49 +0000 (13:17 +1000)] 
Merge remote-tracking branch 'dma-buf/for-next'

7 years agoMerge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:15:52 +0000 (13:15 +1000)] 
Merge remote-tracking branch 'pwm/for-next'

7 years agoMerge remote-tracking branch 'gpio/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:13:14 +0000 (13:13 +1000)] 
Merge remote-tracking branch 'gpio/for-next'

7 years agoMerge remote-tracking branch 'rpmsg/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:07:12 +0000 (13:07 +1000)] 
Merge remote-tracking branch 'rpmsg/for-next'

7 years agoMerge remote-tracking branch 'remoteproc/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:07:00 +0000 (13:07 +1000)] 
Merge remote-tracking branch 'remoteproc/for-next'

7 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:05:24 +0000 (13:05 +1000)] 
Merge remote-tracking branch 'pinctrl/for-next'

7 years agoMerge remote-tracking branch 'libata/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:03:44 +0000 (13:03 +1000)] 
Merge remote-tracking branch 'libata/for-next'

7 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 03:02:05 +0000 (13:02 +1000)] 
Merge remote-tracking branch 'scsi/for-next'

7 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:53:12 +0000 (12:53 +1000)] 
Merge remote-tracking branch 'cgroup/for-next'

7 years agoMerge remote-tracking branch 'extcon/extcon-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:51:38 +0000 (12:51 +1000)] 
Merge remote-tracking branch 'extcon/extcon-next'

7 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:49:15 +0000 (12:49 +1000)] 
Merge remote-tracking branch 'char-misc/char-misc-next'

7 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:47:30 +0000 (12:47 +1000)] 
Merge remote-tracking branch 'staging/staging-next'

7 years agoMerge remote-tracking branch 'usb-chipidea-next/ci-for-usb-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:45:57 +0000 (12:45 +1000)] 
Merge remote-tracking branch 'usb-chipidea-next/ci-for-usb-next'

7 years agoMerge remote-tracking branch 'usb-serial/usb-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:44:24 +0000 (12:44 +1000)] 
Merge remote-tracking branch 'usb-serial/usb-next'

7 years agoMerge remote-tracking branch 'usb-gadget/next'
Stephen Rothwell [Tue, 13 Sep 2016 02:42:48 +0000 (12:42 +1000)] 
Merge remote-tracking branch 'usb-gadget/next'

7 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:41:11 +0000 (12:41 +1000)] 
Merge remote-tracking branch 'usb/usb-next'

7 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:39:35 +0000 (12:39 +1000)] 
Merge remote-tracking branch 'tty/tty-next'

7 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:37:59 +0000 (12:37 +1000)] 
Merge remote-tracking branch 'driver-core/driver-core-next'

7 years agoMerge remote-tracking branch 'ipmi/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:37:56 +0000 (12:37 +1000)] 
Merge remote-tracking branch 'ipmi/for-next'

7 years agoMerge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:36:19 +0000 (12:36 +1000)] 
Merge remote-tracking branch 'leds/for-next'

7 years agoMerge remote-tracking branch 'hsi/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:34:45 +0000 (12:34 +1000)] 
Merge remote-tracking branch 'hsi/for-next'

7 years agoMerge remote-tracking branch 'chrome-platform/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:34:41 +0000 (12:34 +1000)] 
Merge remote-tracking branch 'chrome-platform/for-next'

7 years agoMerge remote-tracking branch 'drivers-x86/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:33:09 +0000 (12:33 +1000)] 
Merge remote-tracking branch 'drivers-x86/for-next'

7 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:31:37 +0000 (12:31 +1000)] 
Merge remote-tracking branch 'workqueues/for-next'

7 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:30:04 +0000 (12:30 +1000)] 
Merge remote-tracking branch 'percpu/for-next'

7 years agoMerge remote-tracking branch 'xen-tip/linux-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:28:32 +0000 (12:28 +1000)] 
Merge remote-tracking branch 'xen-tip/linux-next'

7 years agoextcon: Add support for qcom SPMI PMIC USB id detection hardware
Stephen Boyd [Fri, 9 Sep 2016 21:48:47 +0000 (14:48 -0700)] 
extcon: Add support for qcom SPMI PMIC USB id detection hardware

Some Qualcomm PMICs have a misc device that performs USB id pin
detection via an interrupt. When the interrupt triggers, we
should read the interrupt line to see if it has gone high or low.
If the interrupt is low then the ID pin is grounded, and if the
interrupt is high then the ID pin is being held high.

Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
[cw00.choi: Edited the driver description and added the author information]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoextcon: Use the extcon_set_state_sync() instead of deprecated functions
Chanwoo Choi [Tue, 16 Aug 2016 06:55:34 +0000 (15:55 +0900)] 
extcon: Use the extcon_set_state_sync() instead of deprecated functions

This patch alters the renamed extcon API to set the state of the external
connectors instead of deprecated extcon_set_cable_state_().

Because the patch[1] modifies the function name to maintain the function
naming pattern.
- extcon_set_cable_state_() -> extcon_set_state_sync()
- extcon_get_cable_state_() -> extcon_get_state()

[1] https://lkml.org/lkml/2016/8/4/729
- extcon: Rename the extcon_set/get_state() to maintain the function naming pattern

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Roger Quadros <rogerq@ti.com>
7 years agoextcon: axp288: Fix spelling mistake
Colin Ian King [Wed, 17 Aug 2016 18:02:35 +0000 (19:02 +0100)] 
extcon: axp288: Fix spelling mistake

This patch fixes the spelling mistake in dev_dbg messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
[cw00.choi: Modify the patch title/description]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoextcon: max14577: Change Krzysztof Kozlowski's email to kernel.org
Krzysztof Kozlowski [Wed, 17 Aug 2016 12:07:44 +0000 (14:07 +0200)] 
extcon: max14577: Change Krzysztof Kozlowski's email to 

Change my email address to kernel.org instead of Samsung one for the
purpose of any future contact.  The copyrights remain untouched and are
attributed to Samsung.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoMerge remote-tracking branch 'kvm-ppc-paulus/kvm-ppc-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:26:25 +0000 (12:26 +1000)] 
Merge remote-tracking branch 'kvm-ppc-paulus/kvm-ppc-next'

7 years agoMerge remote-tracking branch 'kvm-mips/next'
Stephen Rothwell [Tue, 13 Sep 2016 02:24:52 +0000 (12:24 +1000)] 
Merge remote-tracking branch 'kvm-mips/next'

7 years agoMerge remote-tracking branch 'kvm-arm/next'
Stephen Rothwell [Tue, 13 Sep 2016 02:23:19 +0000 (12:23 +1000)] 
Merge remote-tracking branch 'kvm-arm/next'

7 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:21:37 +0000 (12:21 +1000)] 
Merge remote-tracking branch 'kvm/linux-next'

7 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Tue, 13 Sep 2016 02:12:37 +0000 (12:12 +1000)] 
Merge remote-tracking branch 'rcu/rcu/next'

7 years agoMerge remote-tracking branch 'ftrace/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:05:37 +0000 (12:05 +1000)] 
Merge remote-tracking branch 'ftrace/for-next'

7 years agoMerge remote-tracking branch 'irqchip/irqchip/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:04:04 +0000 (12:04 +1000)] 
Merge remote-tracking branch 'irqchip/irqchip/for-next'

7 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 02:02:31 +0000 (12:02 +1000)] 
Merge remote-tracking branch 'edac-amd/for-next'

7 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Tue, 13 Sep 2016 01:53:17 +0000 (11:53 +1000)] 
Merge remote-tracking branch 'tip/auto-latest'

7 years agoMerge remote-tracking branch 'spi/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:51:21 +0000 (11:51 +1000)] 
Merge remote-tracking branch 'spi/for-next'

7 years agoMerge remote-tracking branch 'mailbox/mailbox-for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:49:49 +0000 (11:49 +1000)] 
Merge remote-tracking branch 'mailbox/mailbox-for-next'

7 years agoMerge remote-tracking branch 'devicetree/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:48:16 +0000 (11:48 +1000)] 
Merge remote-tracking branch 'devicetree/for-next'

7 years agoMerge remote-tracking branch 'audit/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:46:41 +0000 (11:46 +1000)] 
Merge remote-tracking branch 'audit/next'

7 years agoMerge remote-tracking branch 'jc_docs/docs-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:45:07 +0000 (11:45 +1000)] 
Merge remote-tracking branch 'jc_docs/docs-next'

7 years agoMerge remote-tracking branch 'vfio/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:43:34 +0000 (11:43 +1000)] 
Merge remote-tracking branch 'vfio/next'

7 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:41:59 +0000 (11:41 +1000)] 
Merge remote-tracking branch 'iommu/next'

7 years agoMerge remote-tracking branch 'tpmdd/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:41:55 +0000 (11:41 +1000)] 
Merge remote-tracking branch 'tpmdd/next'

7 years agoMerge remote-tracking branch 'selinux/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:37:45 +0000 (11:37 +1000)] 
Merge remote-tracking branch 'selinux/next'

7 years agoMerge remote-tracking branch 'keys/keys-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:36:05 +0000 (11:36 +1000)] 
Merge remote-tracking branch 'keys/keys-next'

7 years agoMerge remote-tracking branch 'integrity/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:36:01 +0000 (11:36 +1000)] 
Merge remote-tracking branch 'integrity/next'

7 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:31:53 +0000 (11:31 +1000)] 
Merge remote-tracking branch 'security/next'

7 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:29:53 +0000 (11:29 +1000)] 
Merge remote-tracking branch 'regulator/for-next'

7 years agoMerge remote-tracking branch 'omap_dss2/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:28:21 +0000 (11:28 +1000)] 
Merge remote-tracking branch 'omap_dss2/for-next'

7 years agoMerge remote-tracking branch 'battery/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:26:47 +0000 (11:26 +1000)] 
Merge remote-tracking branch 'battery/for-next'

7 years agoMerge remote-tracking branch 'mfd/for-mfd-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:25:12 +0000 (11:25 +1000)] 
Merge remote-tracking branch 'mfd/for-mfd-next'

7 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:17:56 +0000 (11:17 +1000)] 
Merge remote-tracking branch 'md/for-next'

7 years agoMerge remote-tracking branch 'mmc-uh/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:16:19 +0000 (11:16 +1000)] 
Merge remote-tracking branch 'mmc-uh/next'

7 years agoMerge remote-tracking branch 'lightnvm/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:14:43 +0000 (11:14 +1000)] 
Merge remote-tracking branch 'lightnvm/for-next'

7 years agoextcon: Introduce EXTCON_PROP_DISP_HPD property
Chris Zhong [Sat, 10 Sep 2016 02:15:44 +0000 (19:15 -0700)] 
extcon: Introduce EXTCON_PROP_DISP_HPD property

EXTCON_PROP_DISP_HPD is need by display port, if the system has no hpd
interrupt, this property can be used.
- HPD (Hot Plug Detect) send the signal whether display device is on or off
  to source device.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
[cw00.choi: Add the description of HPD and full name of HPD]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:05:43 +0000 (11:05 +1000)] 
Merge remote-tracking branch 'block/for-next'

7 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Tue, 13 Sep 2016 01:04:09 +0000 (11:04 +1000)] 
Merge remote-tracking branch 'input/next'

7 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:02:25 +0000 (11:02 +1000)] 
Merge remote-tracking branch 'sound-asoc/for-next'

7 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 01:00:49 +0000 (11:00 +1000)] 
Merge remote-tracking branch 'sound/for-next'

7 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Tue, 13 Sep 2016 00:59:17 +0000 (10:59 +1000)] 
Merge remote-tracking branch 'regmap/for-next'

7 years agoMerge remote-tracking branch 'kspp/for-next/kspp'
Stephen Rothwell [Tue, 13 Sep 2016 00:50:13 +0000 (10:50 +1000)] 
Merge remote-tracking branch 'kspp/for-next/kspp'

This page took 0.043695 seconds and 5 git commands to generate.