* [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller
@ 2026-05-27 21:45 xur
2026-05-27 21:45 ` [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO xur
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: xur @ 2026-05-27 21:45 UTC (permalink / raw)
To: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Rong Xu, Miguel Ojeda, Peter Zijlstra,
Jinjie Ruan, Lukas Bulwahn, linux-kernel, Juergen Gross,
Helge Deller, Ryan Roberts, Marc Zyngier, Ard Biesheuvel,
Vincent Donnefort, Alice Ryhl
Cc: x86, linux-arm-kernel
From: Rong Xu <xur@google.com>
Resend this patch:
ChangeLog:
V3: (1) updated the base;
(2) changed vmlinux.lds.S for arm64 to avoid the warnings
from .llvm_bb_addr_map.
Rong Xu (2):
kconfig: Remove the architecture specific config for AutoFDO
kconfig: Remove the architecture specific config for Propeller
arch/Kconfig | 8 --------
arch/arm64/kernel/vmlinux.lds.S | 3 +++
arch/x86/Kconfig | 2 --
3 files changed, 3 insertions(+), 10 deletions(-)
base-commit: 2c31897a17e55a6da529b4e797e98c6febc60fd2
--
2.54.0.794.g4f17f83d09-goog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO
2026-05-27 21:45 [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller xur
@ 2026-05-27 21:45 ` xur
2026-05-30 0:47 ` Nathan Chancellor
2026-05-27 21:45 ` [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller xur
2026-05-29 16:32 ` [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller Will Deacon
2 siblings, 1 reply; 12+ messages in thread
From: xur @ 2026-05-27 21:45 UTC (permalink / raw)
To: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Rong Xu, Miguel Ojeda, Peter Zijlstra,
Jinjie Ruan, Lukas Bulwahn, linux-kernel, Juergen Gross,
Helge Deller, Ryan Roberts, Marc Zyngier, Ard Biesheuvel,
Vincent Donnefort, Alice Ryhl
Cc: x86, linux-arm-kernel
From: Rong Xu <xur@google.com>
The CONFIG_AUTOFDO_CLANG option currently depends on
ARCH_SUPPORTS_AUTOFDO_CLANG, but this dependency seems unnecessary.
Remove ARCH_SUPPORTS_AUTOFDO_CLANG and allow users to control AutoFDO
builds solely through CONFIG_AUTOFDO_CLANG. This simplifies the kconfig
and avoids potential confusion.
Signed-off-by: Rong Xu <xur@google.com>
Suggested-by: Will Deacon <will@kernel.org>
Tested-by: Yabin Cui <yabinc@google.com>
Reviewed-by: Kees Cook <kees@kernel.org>
---
arch/Kconfig | 4 ----
arch/x86/Kconfig | 1 -
2 files changed, 5 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index e86880045158..e510c585ea84 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -863,12 +863,8 @@ config LTO_CLANG_THIN
If unsure, say Y.
endchoice
-config ARCH_SUPPORTS_AUTOFDO_CLANG
- bool
-
config AUTOFDO_CLANG
bool "Enable Clang's AutoFDO build (EXPERIMENTAL)"
- depends on ARCH_SUPPORTS_AUTOFDO_CLANG
depends on CC_IS_CLANG && CLANG_VERSION >= 170000
help
This option enables Clang’s AutoFDO build. When
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f3f7cb01d69d..10bf3984102e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -130,7 +130,6 @@ config X86
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_RT
- select ARCH_SUPPORTS_AUTOFDO_CLANG
select ARCH_SUPPORTS_PROPELLER_CLANG if X86_64
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF if X86_CX8
--
2.54.0.794.g4f17f83d09-goog
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-05-27 21:45 [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller xur
2026-05-27 21:45 ` [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO xur
@ 2026-05-27 21:45 ` xur
2026-05-30 0:47 ` Nathan Chancellor
2026-05-29 16:32 ` [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller Will Deacon
2 siblings, 1 reply; 12+ messages in thread
From: xur @ 2026-05-27 21:45 UTC (permalink / raw)
To: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Rong Xu, Miguel Ojeda, Peter Zijlstra,
Jinjie Ruan, Lukas Bulwahn, linux-kernel, Juergen Gross,
Helge Deller, Ryan Roberts, Marc Zyngier, Ard Biesheuvel,
Vincent Donnefort, Alice Ryhl
Cc: x86, linux-arm-kernel
From: Rong Xu <xur@google.com>
The CONFIG_PROPELLER_CLANG option currently depends on
ARCH_SUPPORTS_PROPELLER_CLANG, but this dependency seems unnecessary.
Remove ARCH_SUPPORTS_PROPELLER_CLANG and allow users to control
Propeller builds solely through CONFIG_PROPELLER_CLANG. This simplifies
the kconfig and avoids potential confusion.
For arm64, change vmlinux.lds.S to ensure the .llvm_bb_addr_map is
explicitly placed within its own section.
Signed-off-by: Rong Xu <xur@google.com>
Suggested-by: Will Deacon <will@kernel.org>
Tested-by: Yabin Cui <yabinc@google.com>
Reviewed-by: Kees Cook <kees@kernel.org>
---
arch/Kconfig | 4 ----
arch/arm64/kernel/vmlinux.lds.S | 3 +++
arch/x86/Kconfig | 1 -
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index e510c585ea84..e4eaca9c917c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -879,12 +879,8 @@ config AUTOFDO_CLANG
If unsure, say N.
-config ARCH_SUPPORTS_PROPELLER_CLANG
- bool
-
config PROPELLER_CLANG
bool "Enable Clang's Propeller build"
- depends on ARCH_SUPPORTS_PROPELLER_CLANG
depends on CC_IS_CLANG && CLANG_VERSION >= 190000
help
This option enables Clang’s Propeller build. When the Propeller
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index e1ac876200a3..44a42e7c66cf 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -368,6 +368,9 @@ SECTIONS
STABS_DEBUG
DWARF_DEBUG
+#ifdef CONFIG_PROPELLER_CLANG
+ .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
+#endif
MODINFO
ELF_DETAILS
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 10bf3984102e..b875d2f27e48 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -130,7 +130,6 @@ config X86
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_RT
- select ARCH_SUPPORTS_PROPELLER_CLANG if X86_64
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF if X86_CX8
select ARCH_USE_MEMTEST
--
2.54.0.794.g4f17f83d09-goog
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller
2026-05-27 21:45 [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller xur
2026-05-27 21:45 ` [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO xur
2026-05-27 21:45 ` [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller xur
@ 2026-05-29 16:32 ` Will Deacon
2 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2026-05-29 16:32 UTC (permalink / raw)
To: xur
Cc: Yabin Cui, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Miguel Ojeda, Peter Zijlstra, Jinjie Ruan,
Lukas Bulwahn, linux-kernel, Juergen Gross, Helge Deller,
Ryan Roberts, Marc Zyngier, Ard Biesheuvel, Vincent Donnefort,
Alice Ryhl, x86, linux-arm-kernel
On Wed, May 27, 2026 at 02:45:06PM -0700, xur@google.com wrote:
> From: Rong Xu <xur@google.com>
>
> Resend this patch:
>
> ChangeLog:
> V3: (1) updated the base;
> (2) changed vmlinux.lds.S for arm64 to avoid the warnings
> from .llvm_bb_addr_map.
>
> Rong Xu (2):
> kconfig: Remove the architecture specific config for AutoFDO
> kconfig: Remove the architecture specific config for Propeller
>
> arch/Kconfig | 8 --------
> arch/arm64/kernel/vmlinux.lds.S | 3 +++
> arch/x86/Kconfig | 2 --
> 3 files changed, 3 insertions(+), 10 deletions(-)
For the series:
Acked-by: Will Deacon <will@kernel.org>
Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO
2026-05-27 21:45 ` [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO xur
@ 2026-05-30 0:47 ` Nathan Chancellor
2026-06-01 16:52 ` Rong Xu
0 siblings, 1 reply; 12+ messages in thread
From: Nathan Chancellor @ 2026-05-30 0:47 UTC (permalink / raw)
To: xur
Cc: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Miguel Ojeda, Peter Zijlstra, Jinjie Ruan,
Lukas Bulwahn, linux-kernel, Juergen Gross, Helge Deller,
Ryan Roberts, Marc Zyngier, Ard Biesheuvel, Vincent Donnefort,
Alice Ryhl, x86, linux-arm-kernel
On Wed, 27 May 2026 14:45:07 -0700, xur@google.com <xur@google.com> wrote:
> The CONFIG_AUTOFDO_CLANG option currently depends on
> ARCH_SUPPORTS_AUTOFDO_CLANG, but this dependency seems unnecessary.
>
> Remove ARCH_SUPPORTS_AUTOFDO_CLANG and allow users to control AutoFDO
> builds solely through CONFIG_AUTOFDO_CLANG. This simplifies the kconfig
> and avoids potential confusion.
It is worth noting that not all architectures support
'-fsplit-machine-functions' but I guess that does not matter too much
because it will only be used if a profile is provided, which would
require an architecture that is supported by the AutoFDO tooling? The
documentation is x86_64 focused but aarch64 works as well, any others
that the kernel supports?
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-05-27 21:45 ` [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller xur
@ 2026-05-30 0:47 ` Nathan Chancellor
2026-06-01 18:18 ` Rong Xu
0 siblings, 1 reply; 12+ messages in thread
From: Nathan Chancellor @ 2026-05-30 0:47 UTC (permalink / raw)
To: xur
Cc: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nathan Chancellor, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Miguel Ojeda, Peter Zijlstra, Jinjie Ruan,
Lukas Bulwahn, linux-kernel, Juergen Gross, Helge Deller,
Ryan Roberts, Marc Zyngier, Ard Biesheuvel, Vincent Donnefort,
Alice Ryhl, x86, linux-arm-kernel
On Wed, 27 May 2026 14:45:08 -0700, xur@google.com <xur@google.com> wrote:
> diff --git a/arch/Kconfig b/arch/Kconfig
> index e510c585ea84..e4eaca9c917c 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -879,12 +879,8 @@ config AUTOFDO_CLANG
>
> If unsure, say N.
>
> -config ARCH_SUPPORTS_PROPELLER_CLANG
> - bool
> -
> config PROPELLER_CLANG
> bool "Enable Clang's Propeller build"
> - depends on ARCH_SUPPORTS_PROPELLER_CLANG
It does not look like '-fbasic-block-address-map' or its predecessor,
'-fbasic-block-sections=labels', are supported by all architectures?
This will break allmodconfig for some architectures in that case, so
this needs to addressed with some other dependency.
| $ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper allmodconfig all
| ...
| clang: error: unsupported option '-fbasic-block-address-map' for target 'armv6k-unknown-linux-gnueabi'
| ...
|
| $ make -skj"$(nproc)" ARCH=s390 LLVM=1 mrproper allmodconfig all
| ...
| clang: error: unsupported option '-fbasic-block-address-map' for target 's390x-unknown-linux-gnu'
| ...
Maybe something like
depends on CC_IS_CLANG && $(cc-option,-fbasic-block-address-map)
then cleaning up scripts/Makefile.propeller to use it exclusively?
>
> diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> index e1ac876200a3..44a42e7c66cf 100644
> --- a/arch/arm64/kernel/vmlinux.lds.S
> +++ b/arch/arm64/kernel/vmlinux.lds.S
> @@ -368,6 +368,9 @@ SECTIONS
>
> STABS_DEBUG
> DWARF_DEBUG
> +#ifdef CONFIG_PROPELLER_CLANG
> + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
I would prefer to take the opportunity to consolidate this into
include/asm-generic/vmlinux.lds.h with something like this:
| diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
| index 44a42e7c66cf..8aaf404980a7 100644
| --- a/arch/arm64/kernel/vmlinux.lds.S
| +++ b/arch/arm64/kernel/vmlinux.lds.S
| @@ -368,9 +368,7 @@ SECTIONS
|
| STABS_DEBUG
| DWARF_DEBUG
| -#ifdef CONFIG_PROPELLER_CLANG
| - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| -#endif
| + PROPELLER_DATA
| MODINFO
| ELF_DETAILS
|
| diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
| index 4711a35e706c..d93611675d8a 100644
| --- a/arch/x86/kernel/vmlinux.lds.S
| +++ b/arch/x86/kernel/vmlinux.lds.S
| @@ -423,9 +423,7 @@ SECTIONS
|
| STABS_DEBUG
| DWARF_DEBUG
| -#ifdef CONFIG_PROPELLER_CLANG
| - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| -#endif
| + PROPELLER_DATA
|
| MODINFO
| ELF_DETAILS
| diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
| index 60c8c22fd3e4..7a157a1320b9 100644
| --- a/include/asm-generic/vmlinux.lds.h
| +++ b/include/asm-generic/vmlinux.lds.h
| @@ -1011,6 +1011,13 @@
| #define PERCPU_DECRYPTED_SECTION
| #endif
|
| +#ifdef CONFIG_PROPELLER_CLANG
| +#define PROPELLER_DATA \
| + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| +#else
| +#define PROPELLER_DATA
| +#endif
| +
|
| /*
| * Default discarded sections.
That keeps the ifdef in one place and makes it easy to add this to other
architecture linker scripts as they gain support for Propeller. Are
there any other architectures that need this added? Or are arm64 and
x86_64 the only supported architectures?
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO
2026-05-30 0:47 ` Nathan Chancellor
@ 2026-06-01 16:52 ` Rong Xu
2026-06-01 19:24 ` Nathan Chancellor
0 siblings, 1 reply; 12+ messages in thread
From: Rong Xu @ 2026-06-01 16:52 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nicolas Schier, Linus Walleij, Arnd Bergmann, Mathieu Desnoyers,
Miguel Ojeda, Peter Zijlstra, Jinjie Ruan, Lukas Bulwahn,
linux-kernel, Juergen Gross, Helge Deller, Ryan Roberts,
Marc Zyngier, Ard Biesheuvel, Vincent Donnefort, Alice Ryhl, x86,
linux-arm-kernel
On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Wed, 27 May 2026 14:45:07 -0700, xur@google.com <xur@google.com> wrote:
> > The CONFIG_AUTOFDO_CLANG option currently depends on
> > ARCH_SUPPORTS_AUTOFDO_CLANG, but this dependency seems unnecessary.
> >
> > Remove ARCH_SUPPORTS_AUTOFDO_CLANG and allow users to control AutoFDO
> > builds solely through CONFIG_AUTOFDO_CLANG. This simplifies the kconfig
> > and avoids potential confusion.
>
> It is worth noting that not all architectures support
> '-fsplit-machine-functions' but I guess that does not matter too much
> because it will only be used if a profile is provided, which would
> require an architecture that is supported by the AutoFDO tooling? The
> documentation is x86_64 focused but aarch64 works as well, any others
> that the kernel supports?
Current support extends to x86_64 and arm64 architectures only.
We initially considered making arm64 to opt-in, Will suggests that users should
be expected to verify AutoFDO/Propeller compatibility independently
before using it.
This approach allows for the removal of ARCH_SUPPORTS_..., which prevents
potential confusion.
Thanks!
-Rong
>
> --
> Cheers,
> Nathan
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-05-30 0:47 ` Nathan Chancellor
@ 2026-06-01 18:18 ` Rong Xu
2026-06-02 9:43 ` Will Deacon
0 siblings, 1 reply; 12+ messages in thread
From: Rong Xu @ 2026-06-01 18:18 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nicolas Schier, Linus Walleij, Arnd Bergmann, Mathieu Desnoyers,
Miguel Ojeda, Peter Zijlstra, Jinjie Ruan, Lukas Bulwahn,
linux-kernel, Juergen Gross, Helge Deller, Ryan Roberts,
Marc Zyngier, Ard Biesheuvel, Vincent Donnefort, Alice Ryhl, x86,
linux-arm-kernel
Thanks Nathan for the review! My response is inlined.
On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Wed, 27 May 2026 14:45:08 -0700, xur@google.com <xur@google.com> wrote:
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index e510c585ea84..e4eaca9c917c 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -879,12 +879,8 @@ config AUTOFDO_CLANG
> >
> > If unsure, say N.
> >
> > -config ARCH_SUPPORTS_PROPELLER_CLANG
> > - bool
> > -
> > config PROPELLER_CLANG
> > bool "Enable Clang's Propeller build"
> > - depends on ARCH_SUPPORTS_PROPELLER_CLANG
>
> It does not look like '' or its predecessor,
> '-fbasic-block-sections=labels', are supported by all architectures?
> This will break allmodconfig for some architectures in that case, so
> this needs to addressed with some other dependency.
Thanks for catching this. Yes. -fbasic-block-address-map currently
only supports Arm64 and X86_64 as of now.
We thought people would only enable this config if they knew Propeller
was supported on that architecture.
But the allmodconfig build breaks this assumption. I think I have to
keep this config for propeller, and make arm64 opt-in.
>
> | $ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper allmodconfig all
> | ...
> | clang: error: unsupported option '-fbasic-block-address-map' for target 'armv6k-unknown-linux-gnueabi'
> | ...
> |
> | $ make -skj"$(nproc)" ARCH=s390 LLVM=1 mrproper allmodconfig all
> | ...
> | clang: error: unsupported option '-fbasic-block-address-map' for target 's390x-unknown-linux-gnu'
> | ...
>
> Maybe something like
>
> depends on CC_IS_CLANG && $(cc-option,-fbasic-block-address-map)
>
> then cleaning up scripts/Makefile.propeller to use it exclusively?
I think keep ARCH_SUPPORTS_PROPELLER_CLANG is cleaner.
>
> >
> > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> > index e1ac876200a3..44a42e7c66cf 100644
> > --- a/arch/arm64/kernel/vmlinux.lds.S
> > +++ b/arch/arm64/kernel/vmlinux.lds.S
> > @@ -368,6 +368,9 @@ SECTIONS
> >
> > STABS_DEBUG
> > DWARF_DEBUG
> > +#ifdef CONFIG_PROPELLER_CLANG
> > + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
>
> I would prefer to take the opportunity to consolidate this into
> include/asm-generic/vmlinux.lds.h with something like this:
>
> | diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> | index 44a42e7c66cf..8aaf404980a7 100644
> | --- a/arch/arm64/kernel/vmlinux.lds.S
> | +++ b/arch/arm64/kernel/vmlinux.lds.S
> | @@ -368,9 +368,7 @@ SECTIONS
> |
> | STABS_DEBUG
> | DWARF_DEBUG
> | -#ifdef CONFIG_PROPELLER_CLANG
> | - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
> | -#endif
> | + PROPELLER_DATA
> | MODINFO
> | ELF_DETAILS
> |
> | diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
> | index 4711a35e706c..d93611675d8a 100644
> | --- a/arch/x86/kernel/vmlinux.lds.S
> | +++ b/arch/x86/kernel/vmlinux.lds.S
> | @@ -423,9 +423,7 @@ SECTIONS
> |
> | STABS_DEBUG
> | DWARF_DEBUG
> | -#ifdef CONFIG_PROPELLER_CLANG
> | - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
> | -#endif
> | + PROPELLER_DATA
> |
> | MODINFO
> | ELF_DETAILS
> | diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> | index 60c8c22fd3e4..7a157a1320b9 100644
> | --- a/include/asm-generic/vmlinux.lds.h
> | +++ b/include/asm-generic/vmlinux.lds.h
> | @@ -1011,6 +1011,13 @@
> | #define PERCPU_DECRYPTED_SECTION
> | #endif
> |
> | +#ifdef CONFIG_PROPELLER_CLANG
> | +#define PROPELLER_DATA \
> | + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
> | +#else
> | +#define PROPELLER_DATA
> | +#endif
> | +
> |
> | /*
> | * Default discarded sections.
>
> That keeps the ifdef in one place and makes it easy to add this to other
> architecture linker scripts as they gain support for Propeller. Are
> there any other architectures that need this added? Or are arm64 and
> x86_64 the only supported architectures?
I think this is good idea to move to vmlinux.lds.h. I'll change the
patch accordingly.
>
> --
> Cheers,
> Nathan
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO
2026-06-01 16:52 ` Rong Xu
@ 2026-06-01 19:24 ` Nathan Chancellor
0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2026-06-01 19:24 UTC (permalink / raw)
To: Rong Xu
Cc: Yabin Cui, Will Deacon, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nicolas Schier, Linus Walleij, Arnd Bergmann, Mathieu Desnoyers,
Miguel Ojeda, Peter Zijlstra, Jinjie Ruan, Lukas Bulwahn,
linux-kernel, Juergen Gross, Helge Deller, Ryan Roberts,
Marc Zyngier, Ard Biesheuvel, Vincent Donnefort, Alice Ryhl, x86,
linux-arm-kernel
On Mon, Jun 01, 2026 at 09:52:56AM -0700, Rong Xu wrote:
> On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > On Wed, 27 May 2026 14:45:07 -0700, xur@google.com <xur@google.com> wrote:
> > > The CONFIG_AUTOFDO_CLANG option currently depends on
> > > ARCH_SUPPORTS_AUTOFDO_CLANG, but this dependency seems unnecessary.
> > >
> > > Remove ARCH_SUPPORTS_AUTOFDO_CLANG and allow users to control AutoFDO
> > > builds solely through CONFIG_AUTOFDO_CLANG. This simplifies the kconfig
> > > and avoids potential confusion.
> >
> > It is worth noting that not all architectures support
> > '-fsplit-machine-functions' but I guess that does not matter too much
> > because it will only be used if a profile is provided, which would
> > require an architecture that is supported by the AutoFDO tooling? The
> > documentation is x86_64 focused but aarch64 works as well, any others
> > that the kernel supports?
>
> Current support extends to x86_64 and arm64 architectures only.
>
> We initially considered making arm64 to opt-in, Will suggests that users should
> be expected to verify AutoFDO/Propeller compatibility independently
> before using it.
> This approach allows for the removal of ARCH_SUPPORTS_..., which prevents
> potential confusion.
Right, in cases where the build does not break (i.e., this case), I
think it is fine to leave things open to selection and restrict them
when they become confusing or problematic for users based on real
feedback.
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-06-01 18:18 ` Rong Xu
@ 2026-06-02 9:43 ` Will Deacon
2026-06-02 17:52 ` Rong Xu
0 siblings, 1 reply; 12+ messages in thread
From: Will Deacon @ 2026-06-02 9:43 UTC (permalink / raw)
To: Rong Xu
Cc: Nathan Chancellor, Yabin Cui, Han Shen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Kees Cook, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Miguel Ojeda, Peter Zijlstra, Jinjie Ruan,
Lukas Bulwahn, linux-kernel, Juergen Gross, Helge Deller,
Ryan Roberts, Marc Zyngier, Ard Biesheuvel, Vincent Donnefort,
Alice Ryhl, x86, linux-arm-kernel
On Mon, Jun 01, 2026 at 11:18:27AM -0700, Rong Xu wrote:
> On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan@kernel.org> wrote:
> > On Wed, 27 May 2026 14:45:08 -0700, xur@google.com <xur@google.com> wrote:
> > > diff --git a/arch/Kconfig b/arch/Kconfig
> > > index e510c585ea84..e4eaca9c917c 100644
> > > --- a/arch/Kconfig
> > > +++ b/arch/Kconfig
> > > @@ -879,12 +879,8 @@ config AUTOFDO_CLANG
> > >
> > > If unsure, say N.
> > >
> > > -config ARCH_SUPPORTS_PROPELLER_CLANG
> > > - bool
> > > -
> > > config PROPELLER_CLANG
> > > bool "Enable Clang's Propeller build"
> > > - depends on ARCH_SUPPORTS_PROPELLER_CLANG
> >
> > It does not look like '' or its predecessor,
> > '-fbasic-block-sections=labels', are supported by all architectures?
> > This will break allmodconfig for some architectures in that case, so
> > this needs to addressed with some other dependency.
>
> Thanks for catching this. Yes. -fbasic-block-address-map currently
> only supports Arm64 and X86_64 as of now.
> We thought people would only enable this config if they knew Propeller
> was supported on that architecture.
> But the allmodconfig build breaks this assumption. I think I have to
> keep this config for propeller, and make arm64 opt-in.
>
> >
> > | $ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper allmodconfig all
> > | ...
> > | clang: error: unsupported option '-fbasic-block-address-map' for target 'armv6k-unknown-linux-gnueabi'
> > | ...
> > |
> > | $ make -skj"$(nproc)" ARCH=s390 LLVM=1 mrproper allmodconfig all
> > | ...
> > | clang: error: unsupported option '-fbasic-block-address-map' for target 's390x-unknown-linux-gnu'
> > | ...
> >
> > Maybe something like
> >
> > depends on CC_IS_CLANG && $(cc-option,-fbasic-block-address-map)
> >
> > then cleaning up scripts/Makefile.propeller to use it exclusively?
>
> I think keep ARCH_SUPPORTS_PROPELLER_CLANG is cleaner.
I still don't think it has anything to do with the arch. If the compiler
supports the option, then we can use it. The arch code in the kernel
doesn't need to do anything, right? So can you just check if the
compiler accepts the option using a 'depends on $(cc-option, ...)' line?
Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-06-02 9:43 ` Will Deacon
@ 2026-06-02 17:52 ` Rong Xu
2026-06-03 1:53 ` Nathan Chancellor
0 siblings, 1 reply; 12+ messages in thread
From: Rong Xu @ 2026-06-02 17:52 UTC (permalink / raw)
To: Will Deacon
Cc: Nathan Chancellor, Yabin Cui, Han Shen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin,
Kees Cook, Nicolas Schier, Linus Walleij, Arnd Bergmann,
Mathieu Desnoyers, Miguel Ojeda, Peter Zijlstra, Jinjie Ruan,
Lukas Bulwahn, linux-kernel, Juergen Gross, Helge Deller,
Ryan Roberts, Marc Zyngier, Ard Biesheuvel, Vincent Donnefort,
Alice Ryhl, x86, linux-arm-kernel
On Tue, Jun 2, 2026 at 2:43 AM Will Deacon <will@kernel.org> wrote:
>
> On Mon, Jun 01, 2026 at 11:18:27AM -0700, Rong Xu wrote:
> > On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan@kernel.org> wrote:
> > > On Wed, 27 May 2026 14:45:08 -0700, xur@google.com <xur@google.com> wrote:
> > > > diff --git a/arch/Kconfig b/arch/Kconfig
> > > > index e510c585ea84..e4eaca9c917c 100644
> > > > --- a/arch/Kconfig
> > > > +++ b/arch/Kconfig
> > > > @@ -879,12 +879,8 @@ config AUTOFDO_CLANG
> > > >
> > > > If unsure, say N.
> > > >
> > > > -config ARCH_SUPPORTS_PROPELLER_CLANG
> > > > - bool
> > > > -
> > > > config PROPELLER_CLANG
> > > > bool "Enable Clang's Propeller build"
> > > > - depends on ARCH_SUPPORTS_PROPELLER_CLANG
> > >
> > > It does not look like '' or its predecessor,
> > > '-fbasic-block-sections=labels', are supported by all architectures?
> > > This will break allmodconfig for some architectures in that case, so
> > > this needs to addressed with some other dependency.
> >
> > Thanks for catching this. Yes. -fbasic-block-address-map currently
> > only supports Arm64 and X86_64 as of now.
> > We thought people would only enable this config if they knew Propeller
> > was supported on that architecture.
> > But the allmodconfig build breaks this assumption. I think I have to
> > keep this config for propeller, and make arm64 opt-in.
> >
> > >
> > > | $ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper allmodconfig all
> > > | ...
> > > | clang: error: unsupported option '-fbasic-block-address-map' for target 'armv6k-unknown-linux-gnueabi'
> > > | ...
> > > |
> > > | $ make -skj"$(nproc)" ARCH=s390 LLVM=1 mrproper allmodconfig all
> > > | ...
> > > | clang: error: unsupported option '-fbasic-block-address-map' for target 's390x-unknown-linux-gnu'
> > > | ...
> > >
> > > Maybe something like
> > >
> > > depends on CC_IS_CLANG && $(cc-option,-fbasic-block-address-map)
> > >
> > > then cleaning up scripts/Makefile.propeller to use it exclusively?
> >
> > I think keep ARCH_SUPPORTS_PROPELLER_CLANG is cleaner.
>
> I still don't think it has anything to do with the arch. If the compiler
> supports the option, then we can use it. The arch code in the kernel
> doesn't need to do anything, right? So can you just check if the
> compiler accepts the option using a 'depends on $(cc-option, ...)' line?
Yes, arch code in the kernel does not need to do anything—it is just a marker.
I understand your concern. I can use (cc-options,...) in PROPELLER_CLANG config.
But I will not use -fbasic-block-address-map for backward compatiliby reason.
I would use "-fbasic-block-sections=list=/dev/null".
I'll send the updated patch shortly.
Thanks,
-Rong
>
> Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
2026-06-02 17:52 ` Rong Xu
@ 2026-06-03 1:53 ` Nathan Chancellor
0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2026-06-03 1:53 UTC (permalink / raw)
To: Rong Xu
Cc: Will Deacon, Yabin Cui, Han Shen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook,
Nicolas Schier, Linus Walleij, Arnd Bergmann, Mathieu Desnoyers,
Miguel Ojeda, Peter Zijlstra, Jinjie Ruan, Lukas Bulwahn,
linux-kernel, Juergen Gross, Helge Deller, Ryan Roberts,
Marc Zyngier, Ard Biesheuvel, Vincent Donnefort, Alice Ryhl, x86,
linux-arm-kernel
On Tue, Jun 02, 2026 at 10:52:48AM -0700, Rong Xu wrote:
> On Tue, Jun 2, 2026 at 2:43 AM Will Deacon <will@kernel.org> wrote:
> > I still don't think it has anything to do with the arch. If the compiler
> > supports the option, then we can use it. The arch code in the kernel
> > doesn't need to do anything, right? So can you just check if the
> > compiler accepts the option using a 'depends on $(cc-option, ...)' line?
>
> Yes, arch code in the kernel does not need to do anything—it is just a marker.
>
> I understand your concern. I can use (cc-options,...) in PROPELLER_CLANG config.
> But I will not use -fbasic-block-address-map for backward compatiliby reason.
> I would use "-fbasic-block-sections=list=/dev/null".
>
> I'll send the updated patch shortly.
Technically, an architecture needs to add the section generated by this
compiler option to their linker script to avoid an orphan section
warning (or error from CONFIG_WERROR) if enabled, as has been done in
this series.
I worry that moving to a dynamic check will cause build breakage if an
LLVM target gains support for Propeller without having their kernel
image linker script adjusted. Maybe that will not happen very often and
even if it does, I do not mind taking on the maintenance burden of
fixing it but there is a cost of moving to a dynamic check like this.
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-06-03 1:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27 21:45 [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller xur
2026-05-27 21:45 ` [PATCH v3 1/2] kconfig: Remove the architecture specific config for AutoFDO xur
2026-05-30 0:47 ` Nathan Chancellor
2026-06-01 16:52 ` Rong Xu
2026-06-01 19:24 ` Nathan Chancellor
2026-05-27 21:45 ` [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller xur
2026-05-30 0:47 ` Nathan Chancellor
2026-06-01 18:18 ` Rong Xu
2026-06-02 9:43 ` Will Deacon
2026-06-02 17:52 ` Rong Xu
2026-06-03 1:53 ` Nathan Chancellor
2026-05-29 16:32 ` [PATCH v3 0/2] kconfig: Remove the architecture specific config for AutoFDO and Propeller Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox