From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle cpus Date: Thu, 11 Aug 2016 17:36:45 +0200 Message-ID: <20160811153645.GX30192@twins.programming.kicks-ass.net> References: <1470672218-16059-1-git-send-email-cmetcalf@mellanox.com> <1470672218-16059-5-git-send-email-cmetcalf@mellanox.com> <20160809124325.GG13300@pathway.suse.cz> <20160811152538.GH13300@pathway.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160811152538.GH13300@pathway.suse.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Petr Mladek Cc: Andrew Morton , linux-arch@vger.kernel.org, Daniel Thompson , Russell King , Chris Metcalf , x86@kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Ingo Molnar , Aaron Tomlin , Thomas Gleixner , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On Thu, Aug 11, 2016 at 05:25:38PM +0200, Petr Mladek wrote: > diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h > index b77f5edb03b0..e31d50acd491 100644 > --- a/arch/x86/include/asm/irqflags.h > +++ b/arch/x86/include/asm/irqflags.h > @@ -44,7 +44,7 @@ static inline void native_irq_enable(void) > asm volatile("sti": : :"memory"); > } > > -static inline void native_safe_halt(void) > +static inline __attribute__((__section__(".cpuidle.text"))) void native_safe_halt(void) > { > asm volatile("sti; hlt": : :"memory"); > } An alternative is to use __always_inline I suppose. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:49937 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbcHKPhR (ORCPT ); Thu, 11 Aug 2016 11:37:17 -0400 Date: Thu, 11 Aug 2016 17:36:45 +0200 From: Peter Zijlstra Subject: Re: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle cpus Message-ID: <20160811153645.GX30192@twins.programming.kicks-ass.net> References: <1470672218-16059-1-git-send-email-cmetcalf@mellanox.com> <1470672218-16059-5-git-send-email-cmetcalf@mellanox.com> <20160809124325.GG13300@pathway.suse.cz> <20160811152538.GH13300@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160811152538.GH13300@pathway.suse.cz> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Petr Mladek Cc: Chris Metcalf , "Rafael J. Wysocki" , Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Message-ID: <20160811153645.aUuOTbP86ty4W0qwFQhI8FuB2OWJ9n0RAZhfhv-DJ1U@z> On Thu, Aug 11, 2016 at 05:25:38PM +0200, Petr Mladek wrote: > diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h > index b77f5edb03b0..e31d50acd491 100644 > --- a/arch/x86/include/asm/irqflags.h > +++ b/arch/x86/include/asm/irqflags.h > @@ -44,7 +44,7 @@ static inline void native_irq_enable(void) > asm volatile("sti": : :"memory"); > } > > -static inline void native_safe_halt(void) > +static inline __attribute__((__section__(".cpuidle.text"))) void native_safe_halt(void) > { > asm volatile("sti; hlt": : :"memory"); > } An alternative is to use __always_inline I suppose. From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz@infradead.org (Peter Zijlstra) Date: Thu, 11 Aug 2016 17:36:45 +0200 Subject: [PATCH v7 4/4] nmi_backtrace: generate one-line reports for idle cpus In-Reply-To: <20160811152538.GH13300@pathway.suse.cz> References: <1470672218-16059-1-git-send-email-cmetcalf@mellanox.com> <1470672218-16059-5-git-send-email-cmetcalf@mellanox.com> <20160809124325.GG13300@pathway.suse.cz> <20160811152538.GH13300@pathway.suse.cz> Message-ID: <20160811153645.GX30192@twins.programming.kicks-ass.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Aug 11, 2016 at 05:25:38PM +0200, Petr Mladek wrote: > diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h > index b77f5edb03b0..e31d50acd491 100644 > --- a/arch/x86/include/asm/irqflags.h > +++ b/arch/x86/include/asm/irqflags.h > @@ -44,7 +44,7 @@ static inline void native_irq_enable(void) > asm volatile("sti": : :"memory"); > } > > -static inline void native_safe_halt(void) > +static inline __attribute__((__section__(".cpuidle.text"))) void native_safe_halt(void) > { > asm volatile("sti; hlt": : :"memory"); > } An alternative is to use __always_inline I suppose.