linux-stable/arch
Stephen Boyd 20a2090438 arm64: ftrace: Don't forbid CALL_OPS+CC_OPTIMIZE_FOR_SIZE with Clang
[ Upstream commit a743f26d03 ]

Per commit b3f11af9b2 ("arm64: ftrace: forbid CALL_OPS with
CC_OPTIMIZE_FOR_SIZE"), GCC is silently ignoring `-falign-functions=N`
when passed `-Os`, causing functions to be improperly aligned. This
doesn't seem to be a problem with Clang though, where enabling CALL_OPS
with CC_OPTIMIZE_FOR_SIZE doesn't spit out any warnings at boot about
misaligned patch-sites. Only forbid CALL_OPS if GCC is used and we're
optimizing for size so that CALL_OPS can be used with clang optimizing
for size.

Cc: Jason Ling <jasonling@chromium.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: llvm@lists.linux.dev
Fixes: b3f11af9b2 ("arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20240223064032.3463229-1-swboyd@chromium.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:17:15 -04:00
..
alpha RTC for 6.8 2024-01-18 17:25:39 -08:00
arc work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
arm crypto: arm/sha - fix function cast warnings 2024-03-26 18:17:11 -04:00
arm64 arm64: ftrace: Don't forbid CALL_OPS+CC_OPTIMIZE_FOR_SIZE with Clang 2024-03-26 18:17:15 -04:00
csky work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
hexagon asm-generic cleanups for 6.8 2024-01-10 18:13:44 -08:00
loongarch LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments 2024-02-23 14:36:31 +08:00
m68k kbuild: use 4-space indentation when followed by conditionals 2024-02-15 06:05:44 +09:00
microblaze Microblaze patches for 6.8-rc1 2024-01-17 11:27:23 -08:00
mips MIPS: Clear Cause.BD in instruction_pointer_set 2024-02-12 23:04:40 +01:00
nios2 percpu: 2024-01-18 15:01:28 -08:00
openrisc
parisc parisc architecture fixes for kernel v6.8-rc6: 2024-02-23 10:40:20 -08:00
powerpc powerpc: Force inlining of arch_vmap_p{u/m}d_supported() 2024-03-26 18:17:06 -04:00
riscv riscv: dts: starfive: jh7100: fix root clock names 2024-03-26 18:16:52 -04:00
s390 s390/cache: prevent rebuild of shared_cpu_list 2024-03-26 18:16:55 -04:00
sh sh updates for v6.8 2024-01-20 09:24:06 -08:00
sparc A list handling fix and 64bit division on 32bit platform fix for the 2024-02-23 08:09:50 +10:00
um work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
x86 ACPI: CPPC: enable AMD CPPC V2 support for family 17h processors 2024-03-26 18:16:51 -04:00
xtensa work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-01-25 23:52:21 -08:00