From: Ingo Molnar <mingo@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Andy Lutomirski <luto@kernel.org>,
Brian Gerst <brgerst@gmail.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH] x86/percpu: Enable named address spaces for all capable GCC versions
Date: Tue, 21 May 2024 10:18:27 +0200 [thread overview]
Message-ID: <ZkxY04qY7spBvlYb@gmail.com> (raw)
In-Reply-To: <20240520082134.121320-1-ubizjak@gmail.com>
* Uros Bizjak <ubizjak@gmail.com> wrote:
> Enable named address spaces also for GCC 6, GCC 7 and GCC 8
> releases. These compilers all produce kernel images that boot
> without problems.
>
> Use compile-time test to detect compiler support for named
> address spaces. The test passes with GCC 6 as the earliest
> compiler version where the support for named address spaces
> was introduced.
>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Brian Gerst <brgerst@gmail.com>
> Cc: Denys Vlasenko <dvlasenk@redhat.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> arch/x86/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 9d16fee6bdb8..c9e0a54f469e 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2430,7 +2430,8 @@ source "kernel/livepatch/Kconfig"
> endmenu
>
> config CC_HAS_NAMED_AS
> - def_bool CC_IS_GCC && GCC_VERSION >= 90100
> + def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x c - -S -o /dev/null)
> + depends on CC_IS_GCC
So ... will this test also trigger on Clang, which might have a
__seg_fs/__seg_gs work-alike definition?
Thanks,
Ingo
next prev parent reply other threads:[~2024-05-21 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 8:21 [PATCH] x86/percpu: Enable named address spaces for all capable GCC versions Uros Bizjak
2024-05-21 8:18 ` Ingo Molnar [this message]
2024-05-21 9:13 ` Uros Bizjak
2024-05-21 11:57 ` [tip: x86/percpu] " tip-bot2 for Uros Bizjak
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=ZkxY04qY7spBvlYb@gmail.com \
--to=mingo@kernel.org \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.