Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-08 Thread Petr Mladek
On Mon 2015-12-07 15:48:33, David Laight wrote: > From: Russell King - ARM Linux > > Sent: 04 December 2015 17:13 > ... > > I have a slightly different view... > > > > > > I don't see bust_spinlocks() dealing with any of these locks, so IMHO > > > > trying to make this work in NMI context strikes

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-08 Thread Petr Mladek
> Take the scenario where CPU1 is in the middle of a printk(), and is > holding its lock. > > CPU0 comes along and decides to trigger a NMI backtrace. This sends > a NMI to CPU1, which takes it in the middle of the serial console > output. > > With the existing solution, the NMI output will be

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-08 Thread Petr Mladek
> Take the scenario where CPU1 is in the middle of a printk(), and is > holding its lock. > > CPU0 comes along and decides to trigger a NMI backtrace. This sends > a NMI to CPU1, which takes it in the middle of the serial console > output. > > With the existing solution, the NMI output will be

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-08 Thread Petr Mladek
On Mon 2015-12-07 15:48:33, David Laight wrote: > From: Russell King - ARM Linux > > Sent: 04 December 2015 17:13 > ... > > I have a slightly different view... > > > > > > I don't see bust_spinlocks() dealing with any of these locks, so IMHO > > > > trying to make this work in NMI context strikes

RE: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-07 Thread David Laight
From: Russell King - ARM Linux > Sent: 04 December 2015 17:13 ... > I have a slightly different view... > > > > I don't see bust_spinlocks() dealing with any of these locks, so IMHO > > > trying to make this work in NMI context strikes me as making the > > > existing solution more unreliable on

RE: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-07 Thread David Laight
From: Russell King - ARM Linux > Sent: 04 December 2015 17:13 ... > I have a slightly different view... > > > > I don't see bust_spinlocks() dealing with any of these locks, so IMHO > > > trying to make this work in NMI context strikes me as making the > > > existing solution more unreliable on

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-04 Thread Russell King - ARM Linux
On Fri, Dec 04, 2015 at 04:27:09PM +0100, Petr Mladek wrote: > On Tue 2015-12-01 23:44:37, Russell King - ARM Linux wrote: > > On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > > > What we can do, though, is to zap all printk locks. We already do this > > > when a printk recursion is

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-04 Thread Petr Mladek
On Tue 2015-12-01 23:44:37, Russell King - ARM Linux wrote: > On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > > What we can do, though, is to zap all printk locks. We already do this > > when a printk recursion is detected. This should be safe because > > the system is crashing and

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-04 Thread Petr Mladek
On Tue 2015-12-01 23:44:37, Russell King - ARM Linux wrote: > On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > > What we can do, though, is to zap all printk locks. We already do this > > when a printk recursion is detected. This should be safe because > > the system is crashing and

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-04 Thread Russell King - ARM Linux
On Fri, Dec 04, 2015 at 04:27:09PM +0100, Petr Mladek wrote: > On Tue 2015-12-01 23:44:37, Russell King - ARM Linux wrote: > > On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > > > What we can do, though, is to zap all printk locks. We already do this > > > when a printk recursion is

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-01 Thread Russell King - ARM Linux
On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > What we can do, though, is to zap all printk locks. We already do this > when a printk recursion is detected. This should be safe because > the system is crashing and there shouldn't be any printk caller > that would cause the

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

2015-12-01 Thread Russell King - ARM Linux
On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > What we can do, though, is to zap all printk locks. We already do this > when a printk recursion is detected. This should be safe because > the system is crashing and there shouldn't be any printk caller > that would cause the