Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933544AbbFJSYp (ORCPT ); Wed, 10 Jun 2015 14:24:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754466AbbFJSYb (ORCPT ); Wed, 10 Jun 2015 14:24:31 -0400 Date: Wed, 10 Jun 2015 13:24:29 -0500 From: Josh Poimboeuf To: Pavel Machek Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , x86@kernel.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 01/10] x86/asm: Add FP_SAVE/RESTORE frame pointer macros Message-ID: <20150610182429.GA29482@treble.redhat.com> References: <6b0f0a275e240eb4f6889eea8863875041f05bba.1433937132.git.jpoimboe@redhat.com> <20150610181732.GB2993@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150610181732.GB2993@amd> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1612 Lines: 50 On Wed, Jun 10, 2015 at 08:17:32PM +0200, Pavel Machek wrote: > On Wed 2015-06-10 07:06:09, Josh Poimboeuf wrote: > > Add the FP_SAVE and FP_RESTORE asm macros, which can be used to save and > > restore the frame pointer. > > Add a changelog, which can be used to tell what changed. Fair enough :-) > > Signed-off-by: Josh Poimboeuf > > --- > > arch/x86/include/asm/func.h | 24 ++++++++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > create mode 100644 arch/x86/include/asm/func.h > > > > diff --git a/arch/x86/include/asm/func.h b/arch/x86/include/asm/func.h > > new file mode 100644 > > index 0000000..4d62782 > > --- /dev/null > > +++ b/arch/x86/include/asm/func.h > > @@ -0,0 +1,24 @@ > > +#ifndef _ASM_X86_FUNC_H > > +#define _ASM_X86_FUNC_H > > + > > +#include > > +#include > > + > > +/* > > + * These are frame pointer save and restore macros. They should be used by > > + * every callable non-leaf asm function. > > + */ > > +.macro FP_SAVE name > > + .if CONFIG_FRAME_POINTER > > + push %_ASM_BP > > + _ASM_MOV %_ASM_SP, %_ASM_BP > > + .endif > > +.endm > > Hmm. This will not compile when included into .c file. Should it have > other extension than .h? (Or can the macros be done in different way? These are gnu assembler macros. This file is only included by .S files. -- Josh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/