Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281384
| Path | csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andi Kleen <andi@firstfloor.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] x86: Don't include asm/processor.h into asm/atomic.h |
| Date | Wed, 02 Dec 2015 02:10:02 +0100 |
| Message-ID | <qB45H-ml-3@gated-at.bofh.it> (permalink) |
| X-Original-To | x86@kernel.org |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.20,371,1444719600"; d="scan'208";a="5849037" |
| X-Mailer | git-send-email 2.4.3 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 68 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | rostedt@goodmis.org, peterz@infradead.org, linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com> |
| X-Original-Date | Tue, 1 Dec 2015 17:00:57 -0800 |
| X-Original-Message-ID | <1449018060-1742-1-git-send-email-andi@firstfloor.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1281384 |
Show key headers only | View raw
From: Andi Kleen <ak@linux.intel.com>
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>
---
arch/x86/include/asm/atomic.h | 1 -
arch/x86/include/asm/atomic64_32.h | 1 -
lib/atomic64_test.c | 4 ++++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
index ae5fb83..3e86742 100644
--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
@@ -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>
diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
index a11c30b..a984111 100644
--- a/arch/x86/include/asm/atomic64_32.h
+++ b/arch/x86/include/asm/atomic64_32.h
@@ -3,7 +3,6 @@
#include <linux/compiler.h>
#include <linux/types.h>
-#include <asm/processor.h>
//#include <asm/cmpxchg.h>
/* An 64bit atomic type */
diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 83c33a5b..d51e25a 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -16,6 +16,10 @@
#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); \
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/4] x86: Don't include asm/processor.h into asm/atomic.h Andi Kleen <andi@firstfloor.org> - 2015-12-02 02:10 +0100
[PATCH 2/4] tracepoints: Move struct tracepoint to new tracepoint-defs.h header Andi Kleen <andi@firstfloor.org> - 2015-12-02 02:10 +0100
Re: [PATCH 2/4] tracepoints: Move struct tracepoint to new tracepoint-defs.h header Steven Rostedt <rostedt@goodmis.org> - 2015-12-02 03:00 +0100
[tip:perf/core] tracepoints: Move struct tracepoint to new tracepoint-defs.h header tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-04 13:10 +0100
[tip:perf/core] tracepoints: Move struct tracepoint to new tracepoint-defs.h header tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-06 14:20 +0100
[PATCH 4/4] perf, x86: Remove old MSR perf tracing code Andi Kleen <andi@firstfloor.org> - 2015-12-02 02:10 +0100
[tip:perf/core] perf/x86: Remove old MSR perf tracing code tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-04 13:10 +0100
[tip:perf/core] perf/x86: Remove old MSR perf tracing code tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-06 14:30 +0100
[tip:perf/core] x86/headers: Don't include asm/processor.h in asm /atomic.h tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-04 13:00 +0100
[tip:perf/core] x86/headers: Don't include asm/processor.h in asm /atomic.h tip-bot for Andi Kleen <tipbot@zytor.com> - 2015-12-06 14:20 +0100
csiph-web