Commit 2a6648e6 authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Ingo Molnar

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: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1017579a
#ifndef _ASM_X86_SEGMENT_H_ #ifndef _ASM_X86_SEGMENT_H_
#define _ASM_X86_SEGMENT_H_ #define _ASM_X86_SEGMENT_H_
/* Simple and small GDT entries for booting only */
#define GDT_ENTRY_BOOT_CS 2
#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
/* /*
* The layout of the per-CPU GDT under Linux: * The layout of the per-CPU GDT under Linux:
...@@ -86,14 +94,6 @@ ...@@ -86,14 +94,6 @@
*/ */
#define GDT_ENTRIES 32 #define GDT_ENTRIES 32
/* Simple and small GDT entries for booting only */
#define GDT_ENTRY_BOOT_CS 2
#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
/* The PnP BIOS entries in the GDT */ /* The PnP BIOS entries in the GDT */
#define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0) #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0)
#define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1) #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1)
...@@ -136,14 +136,6 @@ ...@@ -136,14 +136,6 @@
#else #else
#include <asm/cache.h> #include <asm/cache.h>
/* Simple and small GDT entries for booting only */
#define GDT_ENTRY_BOOT_CS 2
#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
#define __KERNEL_CS 0x10 #define __KERNEL_CS 0x10
#define __KERNEL_DS 0x18 #define __KERNEL_DS 0x18
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment