* [#2][PATCH] x86: break mutual header inclusion
@ 2008-05-28 7:46 Vegard Nossum
2008-06-02 10:48 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Vegard Nossum @ 2008-05-28 7:46 UTC (permalink / raw)
To: Ingo Molnar, Adrian Bunk; +Cc: linux-kernel
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Tue, 27 May 2008 21:38:35 +0200
Subject: [PATCH] x86: break mutual header inclusion
This breaks up the mutual inclusion between headers ptrace.h and vm86.h
by moving some small part of vm86.h which is needed by ptrace.h into
processor-flags.h.
We also try to move #include lines to the top.
This has been compile tested on x86_32 and x86_64 defconfig, and run
through 'make headers_check'.
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
---
include/asm-x86/processor-flags.h | 6 ++++++
include/asm-x86/ptrace.h | 11 +++++------
include/asm-x86/vm86.h | 8 +-------
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
index 199cab1..092b39b 100644
--- a/include/asm-x86/processor-flags.h
+++ b/include/asm-x86/processor-flags.h
@@ -88,4 +88,10 @@
#define CX86_ARR_BASE 0xc4
#define CX86_RCR_BASE 0xdc
+#ifdef CONFIG_VM86
+#define X86_VM_MASK X86_EFLAGS_VM
+#else
+#define X86_VM_MASK 0 /* No VM86 support */
+#endif
+
#endif /* __ASM_I386_PROCESSOR_FLAGS_H */
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index 9f922b0..3cdf146 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -3,7 +3,12 @@
#include <linux/compiler.h> /* For __user */
#include <asm/ptrace-abi.h>
+#include <asm/processor-flags.h>
+#ifdef __KERNEL__
+#include <asm/ds.h> /* the DS BTS struct is used for ptrace too */
+#include <asm/segment.h>
+#endif
#ifndef __ASSEMBLY__
@@ -55,9 +60,6 @@ struct pt_regs {
unsigned long ss;
};
-#include <asm/vm86.h>
-#include <asm/segment.h>
-
#endif /* __KERNEL__ */
#else /* __i386__ */
@@ -127,9 +129,6 @@ struct pt_regs {
#ifdef __KERNEL__
-/* the DS BTS struct is used for ptrace as well */
-#include <asm/ds.h>
-
struct task_struct;
extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h
index 074b357..45ab116 100644
--- a/include/asm-x86/vm86.h
+++ b/include/asm-x86/vm86.h
@@ -13,12 +13,7 @@
*/
#include <asm/processor-flags.h>
-
-#ifdef CONFIG_VM86
-#define X86_VM_MASK X86_EFLAGS_VM
-#else
-#define X86_VM_MASK 0 /* No VM86 support */
-#endif
+#include <asm/ptrace.h>
#define BIOSSEG 0x0f000
@@ -141,7 +136,6 @@ struct vm86plus_struct {
* at the end of the structure. Look at ptrace.h to see the "normal"
* setup. For user space layout see 'struct vm86_regs' above.
*/
-#include <asm/ptrace.h>
struct kernel_vm86_regs {
/*
--
1.5.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [#2][PATCH] x86: break mutual header inclusion
2008-05-28 7:46 [#2][PATCH] x86: break mutual header inclusion Vegard Nossum
@ 2008-06-02 10:48 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-06-02 10:48 UTC (permalink / raw)
To: Vegard Nossum; +Cc: Adrian Bunk, linux-kernel
* Vegard Nossum <vegard.nossum@gmail.com> wrote:
> From: Vegard Nossum <vegard.nossum@gmail.com>
> Date: Tue, 27 May 2008 21:38:35 +0200
> Subject: [PATCH] x86: break mutual header inclusion
>
> This breaks up the mutual inclusion between headers ptrace.h and vm86.h
> by moving some small part of vm86.h which is needed by ptrace.h into
> processor-flags.h.
>
> We also try to move #include lines to the top.
>
> This has been compile tested on x86_32 and x86_64 defconfig, and run
> through 'make headers_check'.
applied to tip/x86/cleanups. Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-02 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-28 7:46 [#2][PATCH] x86: break mutual header inclusion Vegard Nossum
2008-06-02 10:48 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox