diff options
Diffstat (limited to 'arch/i386/kernel/machine_kexec.c')
-rw-r--r-- | arch/i386/kernel/machine_kexec.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c index 52ed18d8b511..cb699a2aa1f8 100644 --- a/arch/i386/kernel/machine_kexec.c +++ b/arch/i386/kernel/machine_kexec.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/io.h> | 16 | #include <asm/io.h> |
17 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
18 | #include <asm/cpufeature.h> | 18 | #include <asm/cpufeature.h> |
19 | #include <asm/desc.h> | ||
19 | 20 | ||
20 | static inline unsigned long read_cr3(void) | 21 | static inline unsigned long read_cr3(void) |
21 | { | 22 | { |
@@ -90,33 +91,32 @@ static void identity_map_page(unsigned long address) | |||
90 | } | 91 | } |
91 | #endif | 92 | #endif |
92 | 93 | ||
93 | |||
94 | static void set_idt(void *newidt, __u16 limit) | 94 | static void set_idt(void *newidt, __u16 limit) |
95 | { | 95 | { |
96 | unsigned char curidt[6]; | 96 | struct Xgt_desc_struct curidt; |
97 | 97 | ||
98 | /* ia32 supports unaliged loads & stores */ | 98 | /* ia32 supports unaliged loads & stores */ |
99 | (*(__u16 *)(curidt)) = limit; | 99 | curidt.size = limit; |
100 | (*(__u32 *)(curidt +2)) = (unsigned long)(newidt); | 100 | curidt.address = (unsigned long)newidt; |
101 | 101 | ||
102 | __asm__ __volatile__ ( | 102 | __asm__ __volatile__ ( |
103 | "lidt %0\n" | 103 | "lidtl %0\n" |
104 | : "=m" (curidt) | 104 | : : "m" (curidt) |
105 | ); | 105 | ); |
106 | }; | 106 | }; |
107 | 107 | ||
108 | 108 | ||
109 | static void set_gdt(void *newgdt, __u16 limit) | 109 | static void set_gdt(void *newgdt, __u16 limit) |
110 | { | 110 | { |
111 | unsigned char curgdt[6]; | 111 | struct Xgt_desc_struct curgdt; |
112 | 112 | ||
113 | /* ia32 supports unaligned loads & stores */ | 113 | /* ia32 supports unaligned loads & stores */ |
114 | (*(__u16 *)(curgdt)) = limit; | 114 | curgdt.size = limit; |
115 | (*(__u32 *)(curgdt +2)) = (unsigned long)(newgdt); | 115 | curgdt.address = (unsigned long)newgdt; |
116 | 116 | ||
117 | __asm__ __volatile__ ( | 117 | __asm__ __volatile__ ( |
118 | "lgdt %0\n" | 118 | "lgdtl %0\n" |
119 | : "=m" (curgdt) | 119 | : : "m" (curgdt) |
120 | ); | 120 | ); |
121 | }; | 121 | }; |
122 | 122 | ||