PM / wakeirq: Convert to SRCU
authorThomas Gleixner <tglx@linutronix.de>
Sun, 25 Jun 2017 17:31:13 +0000 (19:31 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Jun 2017 23:51:04 +0000 (01:51 +0200)
commitea0212f40c6bc0594c8eff79266759e3ecd4bacc
treec0f20193c8581a3e32fc6bee229c5c210beb607e
parentc0bc126f97fb929b3ae02c1c62322645d70eb408
PM / wakeirq: Convert to SRCU

The wakeirq infrastructure uses RCU to protect the list of wakeirqs. That
breaks the irq bus locking infrastructure, which is allows sleeping
functions to be called so interrupt controllers behind slow busses,
e.g. i2c, can be handled.

The wakeirq functions hold rcu_read_lock and call into irq functions, which
in case of interrupts using the irq bus locking will trigger a
might_sleep() splat.

Convert the wakeirq infrastructure to Sleepable RCU and unbreak it.

Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling)
Reported-by: Brian Norris <briannorris@chromium.org>
Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Cc: 4.2+ <stable@vger.kernel.org> # 4.2+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/wakeup.c