linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] kernel.h: Move oops_in_progress to printk.h
@ 2020-09-11 17:02 Andy Shevchenko
  2020-09-14  8:43 ` Petr Mladek
  2020-09-14  9:28 ` Sergey Senozhatsky
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2020-09-11 17:02 UTC (permalink / raw)
  To: Petr Mladek, Sergey Senozhatsky, linux-kernel, Steven Rostedt,
	John Ogness
  Cc: Andy Shevchenko

The oops_in_progress is defined in printk.c, so it's logical
to move oops_in_progress to printk.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/debug_locks.h | 2 +-
 include/linux/kernel.h      | 1 -
 include/linux/printk.h      | 2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index e7e45f0cc7da..2915f56ad421 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -2,9 +2,9 @@
 #ifndef __LINUX_DEBUG_LOCKING_H
 #define __LINUX_DEBUG_LOCKING_H
 
-#include <linux/kernel.h>
 #include <linux/atomic.h>
 #include <linux/bug.h>
+#include <linux/printk.h>
 
 struct task_struct;
 
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 6a4e875f198e..dc249ed1a3d5 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -526,7 +526,6 @@ extern unsigned int sysctl_oops_all_cpu_backtrace;
 #endif /* CONFIG_SMP */
 
 extern void bust_spinlocks(int yes);
-extern int oops_in_progress;		/* If set, an oops, panic(), BUG() or die() is in progress */
 extern int panic_timeout;
 extern unsigned long panic_print;
 extern int panic_on_oops;
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 34c1a7be3e01..f749a2c2e7a5 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -12,6 +12,8 @@
 extern const char linux_banner[];
 extern const char linux_proc_banner[];
 
+extern int oops_in_progress;	/* If set, an oops, panic(), BUG() or die() is in progress */
+
 #define PRINTK_MAX_SINGLE_HEADER_LEN 2
 
 static inline int printk_get_level(const char *buffer)
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] kernel.h: Move oops_in_progress to printk.h
  2020-09-11 17:02 [PATCH v1] kernel.h: Move oops_in_progress to printk.h Andy Shevchenko
@ 2020-09-14  8:43 ` Petr Mladek
  2020-09-14 15:00   ` Andy Shevchenko
  2020-09-14  9:28 ` Sergey Senozhatsky
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2020-09-14  8:43 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sergey Senozhatsky, linux-kernel, Steven Rostedt, John Ogness

On Fri 2020-09-11 20:02:02, Andy Shevchenko wrote:
> The oops_in_progress is defined in printk.c, so it's logical
> to move oops_in_progress to printk.h.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Yeah, it makes sense.

Acked-by: Petr Mladek <pmladek@suse.com>

I am always a bit afraid of messing with these heavily used includes.
Let's see if boots complain about some build failure.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] kernel.h: Move oops_in_progress to printk.h
  2020-09-11 17:02 [PATCH v1] kernel.h: Move oops_in_progress to printk.h Andy Shevchenko
  2020-09-14  8:43 ` Petr Mladek
@ 2020-09-14  9:28 ` Sergey Senozhatsky
  1 sibling, 0 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2020-09-14  9:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Petr Mladek, Sergey Senozhatsky, linux-kernel, Steven Rostedt,
	John Ogness

On (20/09/11 20:02), Andy Shevchenko wrote:
[..]
>  extern void bust_spinlocks(int yes);
> -extern int oops_in_progress;		/* If set, an oops, panic(), BUG() or die() is in progress */
>  extern int panic_timeout;
>  extern unsigned long panic_print;
>  extern int panic_on_oops;
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index 34c1a7be3e01..f749a2c2e7a5 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -12,6 +12,8 @@
>  extern const char linux_banner[];
>  extern const char linux_proc_banner[];
>  
> +extern int oops_in_progress;	/* If set, an oops, panic(), BUG() or die() is in progress */

This can also become __read_mostly, I guess.

FWIW,
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] kernel.h: Move oops_in_progress to printk.h
  2020-09-14  8:43 ` Petr Mladek
@ 2020-09-14 15:00   ` Andy Shevchenko
  2020-09-15 12:21     ` Petr Mladek
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2020-09-14 15:00 UTC (permalink / raw)
  To: Petr Mladek; +Cc: Sergey Senozhatsky, linux-kernel, Steven Rostedt, John Ogness

On Mon, Sep 14, 2020 at 10:43:32AM +0200, Petr Mladek wrote:
> On Fri 2020-09-11 20:02:02, Andy Shevchenko wrote:
> > The oops_in_progress is defined in printk.c, so it's logical
> > to move oops_in_progress to printk.h.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Yeah, it makes sense.
> 
> Acked-by: Petr Mladek <pmladek@suse.com>
> 
> I am always a bit afraid of messing with these heavily used includes.
> Let's see if boots complain about some build failure.

Agree.

Just to clarify: I assumed, might be wrongly, that this will go via PRINTK
tree. If you have something else in mind, please tell, I will route it to
the corresponding maintainer(s).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] kernel.h: Move oops_in_progress to printk.h
  2020-09-14 15:00   ` Andy Shevchenko
@ 2020-09-15 12:21     ` Petr Mladek
  2020-09-15 12:54       ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2020-09-15 12:21 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sergey Senozhatsky, linux-kernel, Steven Rostedt, John Ogness

On Mon 2020-09-14 18:00:18, Andy Shevchenko wrote:
> On Mon, Sep 14, 2020 at 10:43:32AM +0200, Petr Mladek wrote:
> > On Fri 2020-09-11 20:02:02, Andy Shevchenko wrote:
> > > The oops_in_progress is defined in printk.c, so it's logical
> > > to move oops_in_progress to printk.h.
> > > 
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > Yeah, it makes sense.
> > 
> > Acked-by: Petr Mladek <pmladek@suse.com>
> > 
> > I am always a bit afraid of messing with these heavily used includes.
> > Let's see if boots complain about some build failure.
> 
> Agree.
> 
> Just to clarify: I assumed, might be wrongly, that this will go via PRINTK
> tree. If you have something else in mind, please tell, I will route it to
> the corresponding maintainer(s).

I have just pushed the patch into printk/linux.git, branch for-5.10.

I am sorry that I was not clear enough. I wanted to wait at least one
day just in case anyone (human or robot) complains.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] kernel.h: Move oops_in_progress to printk.h
  2020-09-15 12:21     ` Petr Mladek
@ 2020-09-15 12:54       ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2020-09-15 12:54 UTC (permalink / raw)
  To: Petr Mladek; +Cc: Sergey Senozhatsky, linux-kernel, Steven Rostedt, John Ogness

On Tue, Sep 15, 2020 at 02:21:25PM +0200, Petr Mladek wrote:
> On Mon 2020-09-14 18:00:18, Andy Shevchenko wrote:
> > On Mon, Sep 14, 2020 at 10:43:32AM +0200, Petr Mladek wrote:
> > > On Fri 2020-09-11 20:02:02, Andy Shevchenko wrote:
> > > > The oops_in_progress is defined in printk.c, so it's logical
> > > > to move oops_in_progress to printk.h.
> > > > 
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > Yeah, it makes sense.
> > > 
> > > Acked-by: Petr Mladek <pmladek@suse.com>
> > > 
> > > I am always a bit afraid of messing with these heavily used includes.
> > > Let's see if boots complain about some build failure.
> > 
> > Agree.
> > 
> > Just to clarify: I assumed, might be wrongly, that this will go via PRINTK
> > tree. If you have something else in mind, please tell, I will route it to
> > the corresponding maintainer(s).
> 
> I have just pushed the patch into printk/linux.git, branch for-5.10.
> 
> I am sorry that I was not clear enough. I wanted to wait at least one
> day just in case anyone (human or robot) complains.

Thank you, Petr, for clarification and applying it!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-15 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 17:02 [PATCH v1] kernel.h: Move oops_in_progress to printk.h Andy Shevchenko
2020-09-14  8:43 ` Petr Mladek
2020-09-14 15:00   ` Andy Shevchenko
2020-09-15 12:21     ` Petr Mladek
2020-09-15 12:54       ` Andy Shevchenko
2020-09-14  9:28 ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).