Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755170AbcCCB3A (ORCPT ); Wed, 2 Mar 2016 20:29:00 -0500 Received: from mail7.hitachi.co.jp ([133.145.228.42]:33490 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbcCCB26 (ORCPT ); Wed, 2 Mar 2016 20:28:58 -0500 From: =?utf-8?B?5rKz5ZCI6Iux5a6PIC8gS0FXQUnvvIxISURFSElSTw==?= To: "'Borislav Petkov'" , Michal Hocko CC: Andrew Morton , Thomas Mingarelli , Wim Van Sebroeck , Corey Minyard , Javi Merino , "linux-watchdog@vger.kernel.org" , "Steven Rostedt (Red Hat)" , Rasmus Villemoes , "linux-kernel@vger.kernel.org" , Michal Nazarewicz , "Vitaly Kuznetsov" , HATAYAMA Daisuke , Gobinda Charan Maji , Tejun Heo , Nicolas Iooss , "openipmi-developer@lists.sourceforge.net" , Borislav Petkov , Thomas Gleixner , Guenter Roeck Subject: RE: [v2 PATCH 1/3] panic: Change nmi_panic from macro to function Thread-Topic: [v2 PATCH 1/3] panic: Change nmi_panic from macro to function Thread-Index: AQHRdHBJxQzekOqwWEO0AMDOrVTeAZ9FjD8AgAABPoCAAVszYA== Date: Thu, 3 Mar 2016 01:28:53 +0000 Message-ID: <04EAB7311EE43145B2D3536183D1A84454B0B94E@GSjpTKYDCembx31.service.hitachi.net> References: <20160302103624.5058.35844.stgit@softrs> <20160302103626.5058.74361.stgit@softrs> <20160302131824.GH26686@dhcp22.suse.cz> <20160302132251.GH16954@pd.tnic> In-Reply-To: <20160302132251.GH16954@pd.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.34] 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 u231T5HU018590 Content-Length: 1439 Lines: 40 Hi, > From: Borislav Petkov [mailto:bp@alien8.de] > On Wed, Mar 02, 2016 at 02:18:24PM +0100, Michal Hocko wrote: > > On Wed 02-03-16 19:36:26, Hidehiro Kawai wrote: > > [...] > > > +void nmi_panic(struct pt_regs *regs, const char *fmt, ...) > > > > Do we really need vargs? All the current users seem to be OK with a > > simple string. This makes the code slightly more complicated without any > > apparent reason. > > I was just wondering the exactly same thing... > > The contra-arg would be that in case someone wants to do nmi_panic() > with more than a string, then it won't work. It's not necessary to use vargs at this point, and passing a simple string is OK for me. Even if someone wants to use vargs, we can modify nmi_panic() without any changes in caller side. So, I'll remove it. > The question is, does nmi_panic() even need to dump something more than > regs and a string? Hmm, printing regs, especially for RIP, would be useful for hang-up cases, but I don't want to do much things in nmi_panic() as long as it is already done by current callers. nmi_panic() can be called concurrently on multiple CPUs, so it also needs another serialization to print something. By the way, I have a patch set to safely leave important information by kexec's purgatory...but no one is interested in? http://thread.gmane.org/gmane.linux.kernel.kexec/15382 Regards, -- Hidehiro Kawai Hitachi, Ltd. Research & Development Group