From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Tejun Heo <tj@kernel.org>,
Calvin Owens <calvinowens@fb.com>,
Thomas Gleixner <tglx@linutronix.de>,
Mel Gorman <mgorman@techsingularity.net>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Laura Abbott <labbott@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [RFC][PATCHv4 2/6] printk: rename nmi.c and exported api
Date: Thu, 24 Nov 2016 17:35:01 +0100 [thread overview]
Message-ID: <20161124163501.GF24103@pathway.suse.cz> (raw)
In-Reply-To: <20161027154933.1211-3-sergey.senozhatsky@gmail.com>
On Fri 2016-10-28 00:49:29, Sergey Senozhatsky wrote:
> A preparation patch for printk_safe work. No functional change.
> - rename nmi.c to print_safe.c
> - rename exported functions to have `safe' prefix.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> arch/arm/kernel/smp.c | 4 +-
> include/linux/hardirq.h | 4 +-
> include/linux/printk.h | 20 +++++-----
> init/Kconfig | 16 ++++----
> init/main.c | 2 +-
> kernel/kexec_core.c | 2 +-
> kernel/panic.c | 4 +-
> kernel/printk/Makefile | 2 +-
> kernel/printk/{nmi.c => printk_safe.c} | 69 +++++++++++++++++-----------------
> lib/nmi_backtrace.c | 2 +-
> 10 files changed, 64 insertions(+), 61 deletions(-)
> rename kernel/printk/{nmi.c => printk_safe.c} (77%)
>
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 7dd14e8..8b056e1 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -644,11 +644,11 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
> break;
>
> case IPI_CPU_BACKTRACE:
> - printk_nmi_enter();
> + printk_safe_nmi_enter();
> irq_enter();
> nmi_cpu_backtrace(regs);
> irq_exit();
> - printk_nmi_exit();
> + printk_safe_nmi_exit();
> break;
>
> default:
> diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
> index c683996..14840aa 100644
> --- a/include/linux/hardirq.h
> +++ b/include/linux/hardirq.h
> @@ -61,7 +61,7 @@ extern void irq_exit(void);
>
> #define nmi_enter() \
> do { \
> - printk_nmi_enter(); \
> + printk_safe_nmi_enter(); \
> lockdep_off(); \
> ftrace_nmi_enter(); \
> BUG_ON(in_nmi()); \
> @@ -78,7 +78,7 @@ extern void irq_exit(void);
> preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \
> ftrace_nmi_exit(); \
> lockdep_on(); \
> - printk_nmi_exit(); \
> + printk_safe_nmi_exit(); \
> } while (0)
>
> #endif /* LINUX_HARDIRQ_H */
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index eac1af8..c9a3080 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -132,17 +132,17 @@ void early_printk(const char *s, ...) { }
> #endif
>
> #ifdef CONFIG_PRINTK_NMI
> -extern void printk_nmi_init(void);
> -extern void printk_nmi_enter(void);
> -extern void printk_nmi_exit(void);
> -extern void printk_nmi_flush(void);
> -extern void printk_nmi_flush_on_panic(void);
> +extern void printk_safe_init(void);
> +extern void printk_safe_nmi_enter(void);
> +extern void printk_safe_nmi_exit(void);
I would personally keep the short names pritnk_nmi_enter() and
printk_nmi_exit(). These are the only functions that will stay
in this CONFIG_PRINT_NMI section. The others are generic and
will be moved to the generic section in the next patch.
Well, it is just a cosmetic problem and a personal opinion.
The patch makes sense and looks fine:
Reviewed-by: Petr Mladek <pmladek@pmladek@suse.com>
Best Regards,
Petr
next prev parent reply other threads:[~2016-11-24 16:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 15:49 [RFC][PATCHv4 0/6] printk: use printk_safe to handle printk() recursive calls Sergey Senozhatsky
2016-10-27 15:49 ` [RFC][PATCHv4 1/6] printk: use vprintk_func in vprintk() Sergey Senozhatsky
2016-11-24 16:28 ` Petr Mladek
2016-10-27 15:49 ` [RFC][PATCHv4 2/6] printk: rename nmi.c and exported api Sergey Senozhatsky
2016-11-24 16:35 ` Petr Mladek [this message]
2016-12-01 1:07 ` Sergey Senozhatsky
2016-12-01 12:12 ` Petr Mladek
2016-10-27 15:49 ` [RFC][PATCHv4 3/6] printk: introduce per-cpu safe_print seq buffer Sergey Senozhatsky
2016-11-24 16:58 ` Petr Mladek
2016-12-01 1:08 ` Sergey Senozhatsky
2016-12-01 5:32 ` Sergey Senozhatsky
2016-10-27 15:49 ` [RFC][PATCHv4 4/6] printk: report lost messages in printk safe/nmi contexts Sergey Senozhatsky
2016-11-25 11:07 ` Petr Mladek
2016-12-01 2:10 ` Sergey Senozhatsky
2016-12-01 12:50 ` Petr Mladek
2016-10-27 15:49 ` [RFC][PATCHv4 5/6] printk: use printk_safe buffers Sergey Senozhatsky
2016-11-25 14:28 ` Petr Mladek
2016-12-01 2:14 ` Sergey Senozhatsky
2016-10-27 15:49 ` [RFC][PATCHv4 6/6] printk: remove zap_locks() function Sergey Senozhatsky
2016-11-25 15:01 ` Petr Mladek
2016-11-25 15:17 ` Peter Zijlstra
2016-12-01 2:34 ` Sergey Senozhatsky
2016-12-01 5:42 ` Peter Zijlstra
2016-12-01 13:36 ` Petr Mladek
2016-12-02 1:11 ` Sergey Senozhatsky
2016-12-01 2:18 ` Sergey Senozhatsky
2016-12-01 12:50 ` Sergey Senozhatsky
2016-12-01 13:15 ` Petr Mladek
2016-10-28 3:30 ` [RFC][PATCHv4 0/6] printk: use printk_safe to handle printk() recursive calls Linus Torvalds
2016-10-28 4:05 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161124163501.GF24103@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=calvinowens@fb.com \
--cc=jack@suse.cz \
--cc=keescook@chromium.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.