mirror-linux/arch
Josh Poimboeuf 2cbb20b008 tracing: Disable branch profiling in noinstr code
CONFIG_TRACE_BRANCH_PROFILING inserts a call to ftrace_likely_update()
for each use of likely() or unlikely().  That breaks noinstr rules if
the affected function is annotated as noinstr.

Disable branch profiling for files with noinstr functions.  In addition
to some individual files, this also includes the entire arch/x86
subtree, as well as the kernel/entry, drivers/cpuidle, and drivers/idle
directories, all of which are noinstr-heavy.

Due to the nature of how sched binaries are built by combining multiple
.c files into one, branch profiling is disabled more broadly across the
sched code than would otherwise be needed.

This fixes many warnings like the following:

  vmlinux.o: warning: objtool: do_syscall_64+0x40: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: warning: objtool: __rdgsbase_inactive+0x33: call to ftrace_likely_update() leaves .noinstr.text section
  vmlinux.o: warning: objtool: handle_bug.isra.0+0x198: call to ftrace_likely_update() leaves .noinstr.text section
  ...

Reported-by: Ingo Molnar <mingo@kernel.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/fb94fc9303d48a5ed370498f54500cc4c338eb6d.1742586676.git.jpoimboe@kernel.org
2025-03-22 09:49:26 +01:00
..
alpha alpha: Use str_yes_no() helper in pci_dac_dma_supported() 2025-02-14 14:06:41 -05:00
arc Kbuild updates for v6.14 2025-01-31 12:07:07 -08:00
arm arm: pgtable: fix NULL pointer dereference issue 2025-03-05 21:36:12 -08:00
arm64 KVM/arm64 fixes for 6.14, take #4 2025-03-09 09:04:08 -10:00
csky asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
hexagon hexagon: Fix unbalanced spinlock in die() 2025-01-30 18:46:06 -08:00
loongarch LoongArch: Enable jump table for objtool 2025-03-12 15:43:39 -07:00
m68k m68k: sun3: add check for __pgd_alloc() 2025-03-05 21:36:12 -08:00
microblaze asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
mips Fix fallout of /scripts/sorttable cleanup 2025-03-02 04:33:15 -08:00
nios2 asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
openrisc The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
parisc mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-02-27 17:40:57 +00:00
powerpc arm64 fixes for -rc5 2025-03-01 13:44:51 -08:00
riscv arm64 fixes for -rc5 2025-03-01 13:44:51 -08:00
s390 s390 updates for 6.14-rc6 2025-03-07 16:21:02 -10:00
sh sh updates for v6.14 2025-02-02 10:40:27 -08:00
sparc mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-02-27 17:40:57 +00:00
um um: convert irq_lock to raw spinlock 2025-02-12 23:40:59 +01:00
x86 tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
xtensa Xtensa updates for v6.14 2025-01-27 08:16:33 -08:00
.gitignore
Kconfig