[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFz223ca89MW+GR_3_cRtfuxkWUkF1H1S2JvLYWtdZkFYA@mail.gmail.com>
Date: Thu, 14 Sep 2017 11:28:30 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Alexander Potapenko <glider@...gle.com>,
Dmitriy Vyukov <dvyukov@...gle.com>,
Matthias Kaehlcke <mka@...omium.org>,
Arnd Bergmann <arnd@...db.de>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more
clear and consistent
On Thu, Sep 14, 2017 at 10:33 AM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>>
>> a) uglifying the 15 or so relevant inline asm locations with ifdefs; or
>
> Actually I guess we could put the "sp" in a macro... I'll try it.
Exactly. Do something like
#ifdef CONFIG_FRAME_POINTER
# define EXTRA_ASM_CLOBBERS "rsp"
#else
# define EXTRA_ASM_CLOBBERS
#endif
and then replace the nasty
register void *__sp asm(_ASM_SP);
..
"+r" (__sp)
games with just that EXTRA_ASM_CLOBBERS thing at the end of the clobbers.
Yes, you'd probably have to document that the alternative_call_2()
thing doesn't take a "input" argument, but a input_and_clobbers, but
all users do that anyway.
I dunno.
Linus
Powered by blists - more mailing lists