Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-29 Thread Linus Walleij
On Fri, Jun 23, 2017 at 10:59 PM, Brian Norris wrote: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at >

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-29 Thread Linus Walleij
On Fri, Jun 23, 2017 at 10:59 PM, Brian Norris wrote: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:238 > [

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Brian Norris wrote: > On Tue, Jun 27, 2017 at 03:06:26PM +0200, Thomas Gleixner wrote: > > That said, the commit should be reverted and the issue needs to analyzed > > proper. We still need the RCU -> SCRU conversion, but that's a different > > problem. > > Can we consider

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Brian Norris wrote: > On Tue, Jun 27, 2017 at 03:06:26PM +0200, Thomas Gleixner wrote: > > That said, the commit should be reverted and the issue needs to analyzed > > proper. We still need the RCU -> SCRU conversion, but that's a different > > problem. > > Can we consider

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Brian Norris
Hi Linus, I'm not sure I follow all of Thomas's suggestions on what should be done in the future yet, but I agree that can be done in parallel: On Tue, Jun 27, 2017 at 03:06:26PM +0200, Thomas Gleixner wrote: > On Tue, 27 Jun 2017, Thomas Gleixner wrote: > > That aside, looking at the commit

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Brian Norris
Hi Linus, I'm not sure I follow all of Thomas's suggestions on what should be done in the future yet, but I agree that can be done in parallel: On Tue, Jun 27, 2017 at 03:06:26PM +0200, Thomas Gleixner wrote: > On Tue, 27 Jun 2017, Thomas Gleixner wrote: > > That aside, looking at the commit

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Heiko Stübner wrote: > Am Dienstag, 27. Juni 2017, 15:01:32 CEST schrieb Thomas Gleixner: > > The only irq chip function which uses the regmap magic is the > > irq_set_type() callback. Now, I have a hard time to understand (though I'm > > no regmap/pinctrl expert) why that

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Heiko Stübner wrote: > Am Dienstag, 27. Juni 2017, 15:01:32 CEST schrieb Thomas Gleixner: > > The only irq chip function which uses the regmap magic is the > > irq_set_type() callback. Now, I have a hard time to understand (though I'm > > no regmap/pinctrl expert) why that

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Heiko Stübner
Hi Thomas, Am Dienstag, 27. Juni 2017, 15:01:32 CEST schrieb Thomas Gleixner: > On Mon, 26 Jun 2017, Brian Norris wrote: > > So I agree that the above commit was problematic, and that you have > > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > > noticed there were other

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Heiko Stübner
Hi Thomas, Am Dienstag, 27. Juni 2017, 15:01:32 CEST schrieb Thomas Gleixner: > On Mon, 26 Jun 2017, Brian Norris wrote: > > So I agree that the above commit was problematic, and that you have > > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > > noticed there were other

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Thomas Gleixner wrote: > That aside, looking at the commit which caused this discussion: > > 88bb94216f59e pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip > > I assume (the changelog lacks details) that the patch want's to avoid a > might sleep splat from the

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Tue, 27 Jun 2017, Thomas Gleixner wrote: > That aside, looking at the commit which caused this discussion: > > 88bb94216f59e pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip > > I assume (the changelog lacks details) that the patch want's to avoid a > might sleep splat from the

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Brian Norris wrote: > So I agree that the above commit was problematic, and that you have > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > noticed there were other threads where people have complained about the > $subject patch also causing problems with

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Brian Norris wrote: > So I agree that the above commit was problematic, and that you have > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > noticed there were other threads where people have complained about the > $subject patch also causing problems with

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Tony Lindgren
* Brian Norris [170627 00:07]: > On Mon, Jun 26, 2017 at 11:24:09PM -0700, Tony Lindgren wrote: > > Hmm so how come drivers/bluetooth/btusb.c can't use the generic > > dev_pm_set_dedicated_wake_irq()? Can you please take a look? > > I took a look previously, and last

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Tony Lindgren
* Brian Norris [170627 00:07]: > On Mon, Jun 26, 2017 at 11:24:09PM -0700, Tony Lindgren wrote: > > Hmm so how come drivers/bluetooth/btusb.c can't use the generic > > dev_pm_set_dedicated_wake_irq()? Can you please take a look? > > I took a look previously, and last time I did, there were too

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Brian Norris
On Mon, Jun 26, 2017 at 11:24:09PM -0700, Tony Lindgren wrote: > Hmm so how come drivers/bluetooth/btusb.c can't use the generic > dev_pm_set_dedicated_wake_irq()? Can you please take a look? I took a look previously, and last time I did, there were too many bugs for it to be useful. You may have

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Brian Norris
On Mon, Jun 26, 2017 at 11:24:09PM -0700, Tony Lindgren wrote: > Hmm so how come drivers/bluetooth/btusb.c can't use the generic > dev_pm_set_dedicated_wake_irq()? Can you please take a look? I took a look previously, and last time I did, there were too many bugs for it to be useful. You may have

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Tony Lindgren
* Brian Norris [170626 17:06]: > So I agree that the above commit was problematic, and that you have > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > noticed there were other threads where people have complained about the > $subject patch also

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-27 Thread Tony Lindgren
* Brian Norris [170626 17:06]: > So I agree that the above commit was problematic, and that you have > fixed that in your patch ("PM / wakeirq: Convert to SRCU"). But I > noticed there were other threads where people have complained about the > $subject patch also causing problems with drivers

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-26 Thread Brian Norris
Hi again Thomas, On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > On Fri, 23 Jun 2017, Brian Norris wrote: > > On Fri, May 26, 2017 at 07:19:00PM -0700, Brian Norris wrote: > > > On Wed, May 17, 2017 at 03:56:34PM -0700, Brian Norris wrote: > > > > > > The thing is, the

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-26 Thread Brian Norris
Hi again Thomas, On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > On Fri, 23 Jun 2017, Brian Norris wrote: > > On Fri, May 26, 2017 at 07:19:00PM -0700, Brian Norris wrote: > > > On Wed, May 17, 2017 at 03:56:34PM -0700, Brian Norris wrote: > > > > > > The thing is, the

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-24 Thread Thomas Gleixner
On Fri, 23 Jun 2017, Paul E. McKenney wrote: > On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > > which added that RCU locking stuff and thereby broke the long existing > > bus_lock() facility of the interrupt core. > > > > irq_bus_lock/unlock was explicitely made to allow

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-24 Thread Thomas Gleixner
On Fri, 23 Jun 2017, Paul E. McKenney wrote: > On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > > which added that RCU locking stuff and thereby broke the long existing > > bus_lock() facility of the interrupt core. > > > > irq_bus_lock/unlock was explicitely made to allow

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Paul E. McKenney
On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > On Fri, 23 Jun 2017, Brian Norris wrote: > > > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > > > [ 7226.716713] BUG: sleeping

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Paul E. McKenney
On Sat, Jun 24, 2017 at 12:12:49AM +0200, Thomas Gleixner wrote: > On Fri, 23 Jun 2017, Brian Norris wrote: > > > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > > > [ 7226.716713] BUG: sleeping

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Thomas Gleixner
On Fri, 23 Jun 2017, Brian Norris wrote: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:238 > [

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Thomas Gleixner
On Fri, 23 Jun 2017, Brian Norris wrote: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:238 > [

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Heiko Stuebner
Am Freitag, 23. Juni 2017, 13:59:11 CEST schrieb Brian Norris: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at >

Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Heiko Stuebner
Am Freitag, 23. Juni 2017, 13:59:11 CEST schrieb Brian Norris: > This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. > > It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: > > [ 7226.716713] BUG: sleeping function called from invalid context at >

[PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Brian Norris
This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: [ 7226.716713] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 [ 7226.716716] in_atomic(): 0, irqs_disabled(): 0, pid: 1708, name:

[PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"

2017-06-23 Thread Brian Norris
This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: [ 7226.716713] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 [ 7226.716716] in_atomic(): 0, irqs_disabled(): 0, pid: 1708, name: