diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-30 07:33:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:01 -0500 |
commit | 2a6648e65a2939b80c44262975176a15bac3a75e (patch) | |
tree | 4c169dd3d1f78676bb65981dab0e80ed2a238c1e /include/asm-x86/segment.h | |
parent | 1017579a8c6ad6f32154e41ddfdf96d1efbb21b4 (diff) |
x86: <asm/segment.h>: boot GDT entries are 32/64-independent
The boot GDT entries are common between 32- and 64-bit mode, so move
them to common code instead of having two identical copies.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/segment.h')
-rw-r--r-- | include/asm-x86/segment.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h index c7509df79141..1ff05a9f5513 100644 --- a/include/asm-x86/segment.h +++ b/include/asm-x86/segment.h | |||
@@ -1,6 +1,14 @@ | |||
1 | #ifndef _ASM_X86_SEGMENT_H_ | 1 | #ifndef _ASM_X86_SEGMENT_H_ |
2 | #define _ASM_X86_SEGMENT_H_ | 2 | #define _ASM_X86_SEGMENT_H_ |
3 | 3 | ||
4 | /* Simple and small GDT entries for booting only */ | ||
5 | |||
6 | #define GDT_ENTRY_BOOT_CS 2 | ||
7 | #define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8) | ||
8 | |||
9 | #define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1) | ||
10 | #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) | ||
11 | |||
4 | #ifdef CONFIG_X86_32 | 12 | #ifdef CONFIG_X86_32 |
5 | /* | 13 | /* |
6 | * The layout of the per-CPU GDT under Linux: | 14 | * The layout of the per-CPU GDT under Linux: |
@@ -86,14 +94,6 @@ | |||
86 | */ | 94 | */ |
87 | #define GDT_ENTRIES 32 | 95 | #define GDT_ENTRIES 32 |
88 | 96 | ||
89 | /* Simple and small GDT entries for booting only */ | ||
90 | |||
91 | #define GDT_ENTRY_BOOT_CS 2 | ||
92 | #define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8) | ||
93 | |||
94 | #define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1) | ||
95 | #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) | ||
96 | |||
97 | /* The PnP BIOS entries in the GDT */ | 97 | /* The PnP BIOS entries in the GDT */ |
98 | #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0) | 98 | #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0) |
99 | #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1) | 99 | #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1) |
@@ -136,14 +136,6 @@ | |||
136 | #else | 136 | #else |
137 | #include <asm/cache.h> | 137 | #include <asm/cache.h> |
138 | 138 | ||
139 | /* Simple and small GDT entries for booting only */ | ||
140 | |||
141 | #define GDT_ENTRY_BOOT_CS 2 | ||
142 | #define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8) | ||
143 | |||
144 | #define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1) | ||
145 | #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) | ||
146 | |||
147 | #define __KERNEL_CS 0x10 | 139 | #define __KERNEL_CS 0x10 |
148 | #define __KERNEL_DS 0x18 | 140 | #define __KERNEL_DS 0x18 |
149 | 141 | ||