summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-07-17 09:14:36 -0700
committerGitHub <[email protected]>2019-07-17 09:14:36 -0700
commit095b5412b31c07cad5cec74a4eb5ace011c92b27 (patch)
treedeb09916f58948aef707cd6bbfbe97bfc89af8e3
parent5784c7c36eca5a0c9ed662dfd9248de4c90862cf (diff)
Fix CONFIG_X86_DEBUG_FPU build failure
When CONFIG_X86_DEBUG_FPU is defined the alternatives_patched symbol is pulled in as a dependency which results in a build failure. To prevent this undefine CONFIG_X86_DEBUG_FPU to disable the WARN_ON_FPU() macro and rely on WARN_ON_ONCE debugging checks which were previously added. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9041 Closes #9049
-rw-r--r--include/linux/simd_x86.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/simd_x86.h b/include/linux/simd_x86.h
index 641f43955..edd456098 100644
--- a/include/linux/simd_x86.h
+++ b/include/linux/simd_x86.h
@@ -84,6 +84,15 @@
#if defined(_KERNEL)
+/*
+ * Disable the WARN_ON_FPU() macro to prevent additional dependencies
+ * when providing the kfpu_* functions. Relevant warnings are included
+ * as appropriate and are unconditionally enabled.
+ */
+#if defined(CONFIG_X86_DEBUG_FPU) && !defined(KERNEL_EXPORTS_X86_FPU)
+#undef CONFIG_X86_DEBUG_FPU
+#endif
+
#if defined(HAVE_KERNEL_FPU_API_HEADER)
#include <asm/fpu/api.h>
#include <asm/fpu/internal.h>