Merge tag 'kvm-s390-next-5.20-1' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / lib / Kconfig.kcsan
index de02244..47a693c 100644 (file)
@@ -187,7 +187,9 @@ config KCSAN_WEAK_MEMORY
        # We can either let objtool nop __tsan_func_{entry,exit}() and builtin
        # atomics instrumentation in .noinstr.text, or use a compiler that can
        # implement __no_kcsan to really remove all instrumentation.
-       depends on STACK_VALIDATION || CC_IS_GCC || CLANG_VERSION >= 140000
+       depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \
+                  CC_IS_GCC || CLANG_VERSION >= 140000
+       select OBJTOOL if HAVE_NOINSTR_HACK
        help
          Enable support for modeling a subset of weak memory, which allows
          detecting a subset of data races due to missing memory barriers.