From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbbG1IBM (ORCPT ); Tue, 28 Jul 2015 04:01:12 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:32903 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbbG1IBI (ORCPT ); Tue, 28 Jul 2015 04:01:08 -0400 Date: Tue, 28 Jul 2015 10:01:03 +0200 From: Michal Hocko To: Hidehiro Kawai Cc: Jonathan Corbet , Peter Zijlstra , Ingo Molnar , "Eric W. Biederman" , "H. Peter Anvin" , Andrew Morton , Thomas Gleixner , Vivek Goyal , linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Ingo Molnar , Masami Hiramatsu Subject: Re: [V2 PATCH 1/3] x86/panic: Fix re-entrance problem due to panic on NMI Message-ID: <20150728080103.GD24972@dhcp22.suse.cz> References: <20150727015850.4928.87717.stgit@softrs> <20150727015850.4928.50289.stgit@softrs> <20150727143405.GF11317@dhcp22.suse.cz> <55B6E2A3.8070004@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B6E2A3.8070004@hitachi.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 28-07-15 11:02:11, Hidehiro Kawai wrote: [...] > > Something like > [...] > > +void nmi_panic(const char *fmt, ...) > > Since we can't directly pass variable arguments to a subroutine, Sure, I was just too lazy to finish this as it was just an illustration of the idea. > we have to use a macro or do like this: > > void nmi_panic(const char *msg) > { > ... > panic("%s", msg); > } > > If there is no objection, I'm going to use a macro. Your other patch needs panic_cpu externally visible so the macro should be OK. -- Michal Hocko SUSE Labs