x86/headers: Don't include asm/processor.h in asm/atomic.h
authorAndi Kleen <ak@linux.intel.com>
Wed, 2 Dec 2015 01:00:57 +0000 (17:00 -0800)
committerIngo Molnar <mingo@kernel.org>
Sun, 6 Dec 2015 11:56:03 +0000 (12:56 +0100)
asm/atomic.h doesn't really need asm/processor.h anymore. Everything
it uses has moved to other header files. So remove that include.

processor.h is a nasty header that includes lots of
other headers and makes it prone to include loops. Removing the
include here makes asm/atomic.h a "leaf" header that can
be safely included in most other headers.

The only fallout is in the lib/atomic tester which relied on
this implicit include. Give it an explicit include.
(the include is in ifdef because the user is also in ifdef)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: rostedt@goodmis.org
Link: http://lkml.kernel.org/r/1449018060-1742-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/atomic.h
arch/x86/include/asm/atomic64_32.h
lib/atomic64_test.c

index ae5fb83e6d91c9bf459b02f143a9b583a4515ed7..3e86742881984006555fa433d9988a2c4eaa7b4f 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
-#include <asm/processor.h>
 #include <asm/alternative.h>
 #include <asm/cmpxchg.h>
 #include <asm/rmwcc.h>
index a11c30b77fb57dfe75b9645ac4f6197d67048e9d..a984111135b16e9c7c51d2cde681aa3b310a6a6b 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
-#include <asm/processor.h>
 //#include <asm/cmpxchg.h>
 
 /* An 64bit atomic type */
index 83c33a5bcffb1a33b44bb5872f94f44fe4d05352..d51e25aa5f1d130ff7c24457692467a56e3d8ac3 100644 (file)
 #include <linux/kernel.h>
 #include <linux/atomic.h>
 
+#ifdef CONFIG_X86
+#include <asm/processor.h>     /* for boot_cpu_has below */
+#endif
+
 #define TEST(bit, op, c_op, val)                               \
 do {                                                           \
        atomic##bit##_set(&v, v0);                              \
This page took 0.026711 seconds and 5 git commands to generate.