Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346435
| From | 河合英宏 / KAWAI,HIDEHIRO <hidehiro.kawai.ez@hitachi.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop |
| Date | 2016-03-01 08:50 +0100 |
| Message-ID | <r7Neb-69t-23@gated-at.bofh.it> (permalink) |
| References | <r7HLs-2tR-15@gated-at.bofh.it> <r7Ieu-2Sw-11@gated-at.bofh.it> <r7MUN-60O-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Borislav,
> From: Borislav Petkov [mailto:bp@alien8.de]
> On Tue, Mar 01, 2016 at 10:50:37AM +0900, Hidehiro Kawai wrote:
> > Export panic_cpu and nmi_panic_self_stop symbols for modules which
> > use nmi_panic() macro.
> >
> > Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Michal Hocko <mhocko@suse.com>
> > Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> > Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> > Cc: Tejun Heo <tj@kernel.org>
> > ---
> > kernel/panic.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/kernel/panic.c b/kernel/panic.c
> > index d96469d..f4e8035 100644
> > --- a/kernel/panic.c
> > +++ b/kernel/panic.c
> > @@ -69,8 +69,10 @@ void __weak nmi_panic_self_stop(struct pt_regs *regs)
> > {
> > panic_smp_self_stop();
> > }
> > +EXPORT_SYMBOL(nmi_panic_self_stop);
> >
> > atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
> > +EXPORT_SYMBOL(panic_cpu);
>
> Can we make nmi_panic() at least a proper function and export that
> instead of exporting all those implementation details...?
The reason I implemented nmi_panic() as a macro is to pass
variable arguments directly to panic(). Fortunately, since all
invocations of nmi_panic() just pass a fixed string, I can change it
to a normal function like:
int nmi_panic(struct pt_regs *regs, const char *msg)
{
...
panic("%s", msg);
If people don't mind if that, I'll change it.
Regards,
--
Hidehiro Kawai
Hitachi, Ltd. Research & Development Group
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> - 2016-03-01 03:30 +0100
Re: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop Borislav Petkov <bp@alien8.de> - 2016-03-01 08:30 +0100
RE: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop 河合英宏 / KAWAI,HIDEHIRO <hidehiro.kawai.ez@hitachi.com> - 2016-03-01 08:50 +0100
Re: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop Michal Hocko <mhocko@kernel.org> - 2016-03-01 09:50 +0100
csiph-web