Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752225AbcCAHsQ (ORCPT ); Tue, 1 Mar 2016 02:48:16 -0500 Received: from mail4.hitachi.co.jp ([133.145.228.5]:56243 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbcCAHsO (ORCPT ); Tue, 1 Mar 2016 02:48:14 -0500 From: =?utf-8?B?5rKz5ZCI6Iux5a6PIC8gS0FXQUnvvIxISURFSElSTw==?= To: "'Borislav Petkov'" CC: Andrew Morton , Thomas Mingarelli , Wim Van Sebroeck , Corey Minyard , Michal Hocko , "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Michal Hocko , Vitaly Kuznetsov , HATAYAMA Daisuke , Tejun Heo , "openipmi-developer@lists.sourceforge.net" , Borislav Petkov , Thomas Gleixner Subject: RE: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop Thread-Topic: [PATCH 1/3] panic: Export panic_cpu and nmi_panic_self_stop Thread-Index: AQHRc4ub4UaWqIKue0WifRVEYNLtqp9EMoUw Date: Tue, 1 Mar 2016 07:48:10 +0000 Message-ID: <04EAB7311EE43145B2D3536183D1A84454B0661B@GSjpTKYDCembx31.service.hitachi.net> References: <20160301015035.4318.78677.stgit@softrs> <20160301015037.4318.33155.stgit@softrs> <20160301072456.GA2997@nazgul.tnic> In-Reply-To: <20160301072456.GA2997@nazgul.tnic> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.198.219.44] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u217mLup029719 Content-Length: 1616 Lines: 53 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 > > Cc: Andrew Morton > > Cc: Borislav Petkov > > Cc: Thomas Gleixner > > Cc: Michal Hocko > > Cc: HATAYAMA Daisuke > > Cc: Vitaly Kuznetsov > > Cc: Tejun Heo > > --- > > 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