[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6CDAC2CA-7F30-4DFF-994D-576E5F8396B7@zytor.com>
Date: Thu, 18 Jul 2024 00:28:09 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Uros Bizjak <ubizjak@...il.com>
CC: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] x86/boot: Use __ASM_SIZE() to reduce ifdeffery in cpuflags.c
On July 18, 2024 12:27:04 AM PDT, Uros Bizjak <ubizjak@...il.com> wrote:
>On Thu, Jul 18, 2024 at 8:59 AM H. Peter Anvin <hpa@...or.com> wrote:
>>
>> >> >-#ifdef __x86_64__
>> >> >-#define PUSHF "pushfq"
>> >> >-#define POPF "popfq"
>> >> >-#else
>> >> >-#define PUSHF "pushfl"
>> >> >-#define POPF "popfl"
>> >> >-#endif
>> >> >+#define PUSHF __ASM_SIZE(pushf)
>> >> >+#define POPF __ASM_SIZE(popf)
>> >> >
>> >> > int has_eflag(unsigned long mask)
>> >> > {
>> >>
>> >> Just use pushf/popf. gas hasn't needed that suffix for a long time as far as I know.
>> >
>> >Yes, this works, too. So I guess we can also remove the comment
>> >explaining the reason for explicit suffixes?
>> >
>> >Thanks,
>> >Uros.
>> >
>>
>> Yeah. You may want to check the version of binutils that fixed it and put that in the comments.
>
>I have checked that the build works with 9 year old binutils-2.25
>(minimal required version), so the fix was applied to an even earlier
>version. I guess we don't want to burden unsuspecting readers with
>historic toolchain oddities, so I propose to just remove the comment
>for good.
>
>Uros.
>
Yeah, I meant the commit message not comments, sorry.
Powered by blists - more mailing lists