Skip to content

Commit

Permalink
x86: break mutual header inclusion
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Vegard Nossum authored and Ingo Molnar committed Jun 2, 2008
1 parent 83bea8e commit 6330a30
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 6 additions & 0 deletions include/asm-x86/processor-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
8 changes: 5 additions & 3 deletions include/asm-x86/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__

Expand Down Expand Up @@ -55,9 +60,6 @@ struct pt_regs {
unsigned long ss;
};

#include <asm/vm86.h>
#include <asm/segment.h>

#endif /* __KERNEL__ */

#else /* __i386__ */
Expand Down
8 changes: 1 addition & 7 deletions include/asm-x86/vm86.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ struct vm86plus_info_struct {
unsigned long is_vm86pus:1; /* for vm86 internal use */
unsigned char vm86dbg_intxxtab[32]; /* for debugger */
};

struct vm86plus_struct {
struct vm86_regs regs;
unsigned long flags;
Expand All @@ -128,11 +127,7 @@ struct vm86plus_struct {

#ifdef __KERNEL__

#ifdef CONFIG_VM86
#define X86_VM_MASK X86_EFLAGS_VM
#else
#define X86_VM_MASK 0 /* No VM86 support */
#endif
#include <asm/ptrace.h>

/*
* This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86
Expand All @@ -142,7 +137,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 {
/*
Expand Down

0 comments on commit 6330a30

Please sign in to comment.