linux-next: manual merge of the mips tree with Linus' tree

From: Stephen Rothwell
Date: Thu Aug 23 2018 - 18:38:57 EST


Hi all,

Today's linux-next merge of the mips tree got a conflict in:

include/linux/compiler_types.h

between commit:

815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive")

from Linus' tree and commit:

04f264d3a8b0 ("compiler.h: Allow arch-specific asm/compiler.h")

from the mips tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc include/linux/compiler_types.h
index 90479a0f3986,4be464a07612..000000000000
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@@ -54,20 -54,44 +54,32 @@@ extern void __chk_io_ptr(const volatil

#ifdef __KERNEL__

-#ifdef __GNUC__
-#include <linux/compiler-gcc.h>
-#endif
-
-#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
-#define notrace __attribute__((hotpatch(0,0)))
-#else
-#define notrace __attribute__((no_instrument_function))
-#endif
-
-/* Intel compiler defines __GNUC__. So we will overwrite implementations
- * coming from above header files here
- */
-#ifdef __INTEL_COMPILER
-# include <linux/compiler-intel.h>
-#endif
-
-/* Clang compiler defines __GNUC__. So we will overwrite implementations
- * coming from above header files here
- */
+/* Compiler specific macros. */
#ifdef __clang__
#include <linux/compiler-clang.h>
+#elif defined(__INTEL_COMPILER)
+#include <linux/compiler-intel.h>
+#elif defined(__GNUC__)
+/* The above compilers also define __GNUC__, so order is important here. */
+#include <linux/compiler-gcc.h>
+#else
+#error "Unknown compiler"
#endif

+ /*
+ * Some architectures need to provide custom definitions of macros provided
+ * by linux/compiler-*.h, and can do so using asm/compiler.h. We include that
+ * conditionally rather than using an asm-generic wrapper in order to avoid
+ * build failures if any C compilation, which will include this file via an
+ * -include argument in c_flags, occurs prior to the asm-generic wrappers being
+ * generated.
+ */
+ #ifdef CONFIG_HAVE_ARCH_COMPILER_H
+ #include <asm/compiler.h>
+ #endif
+
/*
- * Generic compiler-dependent macros required for kernel
+ * Generic compiler-independent macros required for kernel
* build go below this comment. Actual compiler/compiler version
* specific implementations come from the above header files
*/

Attachment: pgp2VFrmFPDs_.pgp
Description: OpenPGP digital signature