Merge branch 'for-next/clang/pgo' of git://git.kernel.org/pub/scm/linux/kernel/git... pgo
authorJens Axboe <axboe@kernel.dk>
Mon, 8 Nov 2021 13:49:26 +0000 (06:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Nov 2021 13:49:26 +0000 (06:49 -0700)
* 'for-next/clang/pgo' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  pgo: rectify comment to proper kernel-doc syntax
  pgo: Clean up prf_open() error paths
  pgo: Fix sleep in atomic section in prf_open()
  pgo: Limit allocate_node() to vmlinux sections
  pgo: rename the raw profile file to vmlinux.profraw
  MAINTAINERS: Expand and relocate PGO entry
  pgo: Add Clang's Profile Guided Optimization infrastructure

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 files changed:
1  2 
MAINTAINERS
Makefile
arch/Kconfig
arch/x86/Kconfig
arch/x86/boot/Makefile
arch/x86/crypto/Makefile
arch/x86/entry/vdso/Makefile
arch/x86/kernel/Makefile
arch/x86/kernel/vmlinux.lds.S
include/asm-generic/vmlinux.lds.h
kernel/Makefile
scripts/Makefile.lib

diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
index ccae1485281413e71d99b83caa1664ed66c887be,a7ee3785b004084183554f5b98600f94a697cd6c..27891044f8d916c221efdebe6aaa16d071ab61c8
+++ b/Makefile
@@@ -677,10 -672,12 +677,13 @@@ endif # KBUILD_EXTMO
  # Defaults to vmlinux, but the arch makefile usually adds further targets
  all: vmlinux
  
 -CFLAGS_GCOV   := -fprofile-arcs -ftest-coverage \
 -      $(call cc-option,-fno-tree-loop-im) \
 -      $(call cc-disable-warning,maybe-uninitialized,)
+ CFLAGS_PGO_CLANG := -fprofile-generate
+ export CFLAGS_PGO_CLANG
 +CFLAGS_GCOV   := -fprofile-arcs -ftest-coverage
 +ifdef CONFIG_CC_IS_GCC
 +CFLAGS_GCOV   += -fno-tree-loop-im
 +endif
  export CFLAGS_GCOV
  
  # The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
diff --cc arch/Kconfig
index 26b8ed11639da464ef30f035a960302eaf162f1e,b06929022f79b7e2f51ec373b7d47194c067285a..fa69deeb147485a5555b0118924a791c5c5d5180
@@@ -1296,13 -1282,8 +1296,14 @@@ config ARCH_SPLIT_ARG6
  config ARCH_HAS_ELFCORE_COMPAT
        bool
  
 +config ARCH_HAS_PARANOID_L1D_FLUSH
 +      bool
 +
 +config DYNAMIC_SIGFRAME
 +      bool
 +
  source "kernel/gcov/Kconfig"
+ source "kernel/pgo/Kconfig"
  
  source "scripts/gcc-plugins/Kconfig"
  
Simple merge
Simple merge
index f307c93fc90a7ae337d2b4da934a1ce2af3a65e4,87ae195604094962de6eb672585849b8ceb1c47a..a177ff8ad782a8ff1a56d012775ccc7139cbd03e
@@@ -86,14 -86,11 +86,17 @@@ nhpoly1305-sse2-y := nh-sse2-x86_64.o n
  obj-$(CONFIG_CRYPTO_NHPOLY1305_AVX2) += nhpoly1305-avx2.o
  nhpoly1305-avx2-y := nh-avx2-x86_64.o nhpoly1305-avx2-glue.o
  
+ # Disable PGO for curve25519-x86_64. With PGO enabled, clang runs out of
+ # registers for some of the functions.
+ PGO_PROFILE_curve25519-x86_64.o := n
  obj-$(CONFIG_CRYPTO_CURVE25519_X86) += curve25519-x86_64.o
  
 +obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64) += sm4-aesni-avx-x86_64.o
 +sm4-aesni-avx-x86_64-y := sm4-aesni-avx-asm_64.o sm4_aesni_avx_glue.o
 +
 +obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64) += sm4-aesni-avx2-x86_64.o
 +sm4-aesni-avx2-x86_64-y := sm4-aesni-avx2-asm_64.o sm4_aesni_avx2_glue.o
 +
  quiet_cmd_perlasm = PERLASM $@
        cmd_perlasm = $(PERL) $< > $@
  $(obj)/%.S: $(src)/%.pl FORCE
Simple merge
index 2ff3e600f4269c4239ee07996180ba34d97bc124,09eb21c0f68c126be0203ae12161306aa999db8e..5cd1e99519fd722cd0d7a92e053eb2e16bda4d13
@@@ -30,8 -29,10 +30,11 @@@ KASAN_SANITIZE_dumpstack_$(BITS).o                  :
  KASAN_SANITIZE_stacktrace.o                           := n
  KASAN_SANITIZE_paravirt.o                             := n
  KASAN_SANITIZE_sev.o                                  := n
 +KASAN_SANITIZE_cc_platform.o                          := n
  
+ # Cannot write to profiling regions before the page tables are set up.
+ PGO_PROFILE_head$(BITS).o                             := n
  # With some compiler versions the generated code results in boot hangs, caused
  # by several compilation units. To be safe, disable all instrumentation.
  KCSAN_SANITIZE := n
Simple merge
Simple merge
diff --cc kernel/Makefile
Simple merge
Simple merge