From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel.thompson@linaro.org (Daniel Thompson) Date: Thu, 05 Mar 2015 12:11:25 +0000 Subject: [PATCH 4.0-rc1 v17 4/6] printk: Simple implementation for NMI backtracing In-Reply-To: <1425489675.2712.16.camel@perches.com> References: <1422022952-31552-1-git-send-email-daniel.thompson@linaro.org> <1425463974-23568-1-git-send-email-daniel.thompson@linaro.org> <1425463974-23568-5-git-send-email-daniel.thompson@linaro.org> <1425485601.2712.9.camel@perches.com> <20150304112010.338501ab@gandalf.local.home> <1425486786.2769.25.camel@linaro.org> <1425489675.2712.16.camel@perches.com> Message-ID: <1425557485.2769.41.camel@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 2015-03-04 at 09:21 -0800, Joe Perches wrote: > On Wed, 2015-03-04 at 16:33 +0000, Daniel Thompson wrote: > > On Wed, 2015-03-04 at 11:20 -0500, Steven Rostedt wrote: > > > On Wed, 04 Mar 2015 08:13:21 -0800 > > > Joe Perches wrote: > > > > > > > On Wed, 2015-03-04 at 10:12 +0000, Daniel Thompson wrote: > > > > > Currently there is a quite a pile of code sitting in > > > > > arch/x86/kernel/apic/hw_nmi.c to support safe all-cpu backtracing from NMI. > > > > > The code is inaccessible to backtrace implementations for other > > > > > architectures, which is a shame because they would probably like to be > > > > > safe too. > > > > > > > > > > Copy this code into printk. We'll port the x86 NMI backtrace to it in a > > > > > later patch. > > > > > > > > I think this would be better as a separate file > > > > rather than increasing the bulk of printk.c > > > > > > > I agree, as printk already has its own directory. Perhaps a > > > "nmi_backtrace.c"? > > > > I agree on moving the code. However, after Thomas' review I made sure > > all the external symbols were prefixed printk_nmi and, as a result of > > the same review I started using CONFIG_PRINTK_NMI to enable/disable the > > feature). For that reason I'm much more inclined to name it > > "printk_nmi.c". Any objections? > > Steven's suggestion seems more sensible. > > sed 's/CONFIG_PRINTK_NMI/CONFIG_PRINTK_NMI_BACKTRACE/g' > sed 's/printk_nmi/printk_nmib/g' > or > sed 's/printk_nmi/nmi_backtrace/g' > > might work well. Ok. The later rename is consistent and makes is much less likely the facility will be (accidentally) misused in future. I'll change like this. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932836AbbCEMLb (ORCPT ); Thu, 5 Mar 2015 07:11:31 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:34347 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932612AbbCEML3 (ORCPT ); Thu, 5 Mar 2015 07:11:29 -0500 Message-ID: <1425557485.2769.41.camel@linaro.org> Subject: Re: [PATCH 4.0-rc1 v17 4/6] printk: Simple implementation for NMI backtracing From: Daniel Thompson To: Joe Perches Cc: Steven Rostedt , Thomas Gleixner , Jason Cooper , Russell King , Will Deacon , Catalin Marinas , Marc Zyngier , Stephen Boyd , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Sumit Semwal , Dirk Behme , Daniel Drake , Dmitry Pervushin , Tim Sander Date: Thu, 05 Mar 2015 12:11:25 +0000 In-Reply-To: <1425489675.2712.16.camel@perches.com> References: <1422022952-31552-1-git-send-email-daniel.thompson@linaro.org> <1425463974-23568-1-git-send-email-daniel.thompson@linaro.org> <1425463974-23568-5-git-send-email-daniel.thompson@linaro.org> <1425485601.2712.9.camel@perches.com> <20150304112010.338501ab@gandalf.local.home> <1425486786.2769.25.camel@linaro.org> <1425489675.2712.16.camel@perches.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-04 at 09:21 -0800, Joe Perches wrote: > On Wed, 2015-03-04 at 16:33 +0000, Daniel Thompson wrote: > > On Wed, 2015-03-04 at 11:20 -0500, Steven Rostedt wrote: > > > On Wed, 04 Mar 2015 08:13:21 -0800 > > > Joe Perches wrote: > > > > > > > On Wed, 2015-03-04 at 10:12 +0000, Daniel Thompson wrote: > > > > > Currently there is a quite a pile of code sitting in > > > > > arch/x86/kernel/apic/hw_nmi.c to support safe all-cpu backtracing from NMI. > > > > > The code is inaccessible to backtrace implementations for other > > > > > architectures, which is a shame because they would probably like to be > > > > > safe too. > > > > > > > > > > Copy this code into printk. We'll port the x86 NMI backtrace to it in a > > > > > later patch. > > > > > > > > I think this would be better as a separate file > > > > rather than increasing the bulk of printk.c > > > > > > > I agree, as printk already has its own directory. Perhaps a > > > "nmi_backtrace.c"? > > > > I agree on moving the code. However, after Thomas' review I made sure > > all the external symbols were prefixed printk_nmi and, as a result of > > the same review I started using CONFIG_PRINTK_NMI to enable/disable the > > feature). For that reason I'm much more inclined to name it > > "printk_nmi.c". Any objections? > > Steven's suggestion seems more sensible. > > sed 's/CONFIG_PRINTK_NMI/CONFIG_PRINTK_NMI_BACKTRACE/g' > sed 's/printk_nmi/printk_nmib/g' > or > sed 's/printk_nmi/nmi_backtrace/g' > > might work well. Ok. The later rename is consistent and makes is much less likely the facility will be (accidentally) misused in future. I'll change like this.