From: Jens Axboe Date: Mon, 8 Nov 2021 13:49:26 +0000 (-0700) Subject: Merge branch 'for-next/clang/pgo' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=refs%2Fheads%2Fpgo;p=linux-2.6-block.git Merge branch 'for-next/clang/pgo' of git://git./linux/kernel/git/kees/linux into pgo * '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 --- 2970c1a5c492f364a9b95c5fa1c005cf60b0fe35 diff --cc Makefile index ccae14852814,a7ee3785b004..27891044f8d9 --- a/Makefile +++ 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_PGO_CLANG := -fprofile-generate + export CFLAGS_PGO_CLANG + -CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \ - $(call cc-option,-fno-tree-loop-im) \ - $(call cc-disable-warning,maybe-uninitialized,) +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 26b8ed11639d,b06929022f79..fa69deeb1474 --- a/arch/Kconfig +++ b/arch/Kconfig @@@ -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" diff --cc arch/x86/crypto/Makefile index f307c93fc90a,87ae19560409..a177ff8ad782 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile @@@ -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 diff --cc arch/x86/kernel/Makefile index 2ff3e600f426,09eb21c0f68c..5cd1e99519fd --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@@ -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