diff options
Diffstat (limited to 'arch/i386/kernel/reboot.c')
-rw-r--r-- | arch/i386/kernel/reboot.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index c71fef31dc4..1cbb9c0f470 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/dmi.h> | 13 | #include <linux/dmi.h> |
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/apic.h> | 15 | #include <asm/apic.h> |
16 | #include <asm/desc.h> | ||
16 | #include "mach_reboot.h" | 17 | #include "mach_reboot.h" |
17 | #include <linux/reboot_fixups.h> | 18 | #include <linux/reboot_fixups.h> |
18 | 19 | ||
@@ -242,13 +243,13 @@ void machine_real_restart(unsigned char *code, int length) | |||
242 | 243 | ||
243 | /* Set up the IDT for real mode. */ | 244 | /* Set up the IDT for real mode. */ |
244 | 245 | ||
245 | __asm__ __volatile__ ("lidt %0" : : "m" (real_mode_idt)); | 246 | load_idt(&real_mode_idt); |
246 | 247 | ||
247 | /* Set up a GDT from which we can load segment descriptors for real | 248 | /* Set up a GDT from which we can load segment descriptors for real |
248 | mode. The GDT is not used in real mode; it is just needed here to | 249 | mode. The GDT is not used in real mode; it is just needed here to |
249 | prepare the descriptors. */ | 250 | prepare the descriptors. */ |
250 | 251 | ||
251 | __asm__ __volatile__ ("lgdt %0" : : "m" (real_mode_gdt)); | 252 | load_gdt(&real_mode_gdt); |
252 | 253 | ||
253 | /* Load the data segment registers, and thus the descriptors ready for | 254 | /* Load the data segment registers, and thus the descriptors ready for |
254 | real mode. The base address of each segment is 0x100, 16 times the | 255 | real mode. The base address of each segment is 0x100, 16 times the |
@@ -316,7 +317,7 @@ void machine_emergency_restart(void) | |||
316 | if (!reboot_thru_bios) { | 317 | if (!reboot_thru_bios) { |
317 | if (efi_enabled) { | 318 | if (efi_enabled) { |
318 | efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); | 319 | efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); |
319 | __asm__ __volatile__("lidt %0": :"m" (no_idt)); | 320 | load_idt(&no_idt); |
320 | __asm__ __volatile__("int3"); | 321 | __asm__ __volatile__("int3"); |
321 | } | 322 | } |
322 | /* rebooting needs to touch the page at absolute addr 0 */ | 323 | /* rebooting needs to touch the page at absolute addr 0 */ |
@@ -325,7 +326,7 @@ void machine_emergency_restart(void) | |||
325 | mach_reboot_fixups(); /* for board specific fixups */ | 326 | mach_reboot_fixups(); /* for board specific fixups */ |
326 | mach_reboot(); | 327 | mach_reboot(); |
327 | /* That didn't work - force a triple fault.. */ | 328 | /* That didn't work - force a triple fault.. */ |
328 | __asm__ __volatile__("lidt %0": :"m" (no_idt)); | 329 | load_idt(&no_idt); |
329 | __asm__ __volatile__("int3"); | 330 | __asm__ __volatile__("int3"); |
330 | } | 331 | } |
331 | } | 332 | } |