mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH] x86/boot: Use __ASM_SIZE() to reduce ifdeffery in cpuflags.c
Date: Thu, 18 Jul 2024 00:28:09 -0700	[thread overview]
Message-ID: <6CDAC2CA-7F30-4DFF-994D-576E5F8396B7@zytor.com> (raw)
In-Reply-To: <CAFULd4ZXQzxq4ACOZUKpZKmGFomPxHxc+LhmXZ_uEVizjWbXiA@mail.gmail.com>

On July 18, 2024 12:27:04 AM PDT, Uros Bizjak <ubizjak@gmail.com> wrote:
>On Thu, Jul 18, 2024 at 8:59 AM H. Peter Anvin <hpa@zytor.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.

  reply	other threads:[~2024-07-18  7:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  6:32 Uros Bizjak
2024-07-18  6:35 ` H. Peter Anvin
2024-07-18  6:46   ` Uros Bizjak
2024-07-18  6:58     ` H. Peter Anvin
2024-07-18  7:27       ` Uros Bizjak
2024-07-18  7:28         ` H. Peter Anvin [this message]
2024-07-18  8:52   ` Uros Bizjak
2024-07-18  8:55     ` H. Peter Anvin
2024-07-18  9:12       ` Uros Bizjak
2024-07-18 20:53         ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6CDAC2CA-7F30-4DFF-994D-576E5F8396B7@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=ubizjak@gmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®