diff options
Diffstat (limited to 'arch/x86/include/asm/segment.h')
-rw-r--r-- | arch/x86/include/asm/segment.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h index 231f1c1d6607..cd84f7208f76 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h | |||
@@ -1,14 +1,16 @@ | |||
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 | #include <linux/const.h> | ||
5 | |||
4 | /* Constructor for a conventional segment GDT (or LDT) entry */ | 6 | /* Constructor for a conventional segment GDT (or LDT) entry */ |
5 | /* This is a macro so it can be used in initializers */ | 7 | /* This is a macro so it can be used in initializers */ |
6 | #define GDT_ENTRY(flags, base, limit) \ | 8 | #define GDT_ENTRY(flags, base, limit) \ |
7 | ((((base) & 0xff000000ULL) << (56-24)) | \ | 9 | ((((base) & _AC(0xff000000,ULL)) << (56-24)) | \ |
8 | (((flags) & 0x0000f0ffULL) << 40) | \ | 10 | (((flags) & _AC(0x0000f0ff,ULL)) << 40) | \ |
9 | (((limit) & 0x000f0000ULL) << (48-16)) | \ | 11 | (((limit) & _AC(0x000f0000,ULL)) << (48-16)) | \ |
10 | (((base) & 0x00ffffffULL) << 16) | \ | 12 | (((base) & _AC(0x00ffffff,ULL)) << 16) | \ |
11 | (((limit) & 0x0000ffffULL))) | 13 | (((limit) & _AC(0x0000ffff,ULL)))) |
12 | 14 | ||
13 | /* Simple and small GDT entries for booting only */ | 15 | /* Simple and small GDT entries for booting only */ |
14 | 16 | ||