mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Don't use the EFI reboot method by default x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup x86, reboot: Acer Aspire One A110 reboot quirk x86-32, NUMA: Fix boot regression caused by NUMA init unification on highmem machines
This commit is contained in:
commit
e55f1b1c00
@ -57,6 +57,8 @@ static inline int pfn_valid(int pfn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define early_pfn_valid(pfn) pfn_valid((pfn))
|
||||
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
#ifdef CONFIG_NEED_MULTIPLE_NODES
|
||||
|
@ -28,6 +28,8 @@ pmode_cr3: .long 0 /* Saved %cr3 */
|
||||
pmode_cr4: .long 0 /* Saved %cr4 */
|
||||
pmode_efer: .quad 0 /* Saved EFER */
|
||||
pmode_gdt: .quad 0
|
||||
pmode_misc_en: .quad 0 /* Saved MISC_ENABLE MSR */
|
||||
pmode_behavior: .long 0 /* Wakeup behavior flags */
|
||||
realmode_flags: .long 0
|
||||
real_magic: .long 0
|
||||
trampoline_segment: .word 0
|
||||
@ -91,6 +93,18 @@ wakeup_code:
|
||||
/* Call the C code */
|
||||
calll main
|
||||
|
||||
/* Restore MISC_ENABLE before entering protected mode, in case
|
||||
BIOS decided to clear XD_DISABLE during S3. */
|
||||
movl pmode_behavior, %eax
|
||||
btl $WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE, %eax
|
||||
jnc 1f
|
||||
|
||||
movl pmode_misc_en, %eax
|
||||
movl pmode_misc_en + 4, %edx
|
||||
movl $MSR_IA32_MISC_ENABLE, %ecx
|
||||
wrmsr
|
||||
1:
|
||||
|
||||
/* Do any other stuff... */
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
|
@ -21,6 +21,9 @@ struct wakeup_header {
|
||||
u32 pmode_efer_low; /* Protected mode EFER */
|
||||
u32 pmode_efer_high;
|
||||
u64 pmode_gdt;
|
||||
u32 pmode_misc_en_low; /* Protected mode MISC_ENABLE */
|
||||
u32 pmode_misc_en_high;
|
||||
u32 pmode_behavior; /* Wakeup routine behavior flags */
|
||||
u32 realmode_flags;
|
||||
u32 real_magic;
|
||||
u16 trampoline_segment; /* segment with trampoline code, 64-bit only */
|
||||
@ -39,4 +42,7 @@ extern struct wakeup_header wakeup_header;
|
||||
#define WAKEUP_HEADER_SIGNATURE 0x51ee1111
|
||||
#define WAKEUP_END_SIGNATURE 0x65a22c82
|
||||
|
||||
/* Wakeup behavior bits */
|
||||
#define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE 0
|
||||
|
||||
#endif /* ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H */
|
||||
|
@ -77,6 +77,12 @@ int acpi_suspend_lowlevel(void)
|
||||
|
||||
header->pmode_cr0 = read_cr0();
|
||||
header->pmode_cr4 = read_cr4_safe();
|
||||
header->pmode_behavior = 0;
|
||||
if (!rdmsr_safe(MSR_IA32_MISC_ENABLE,
|
||||
&header->pmode_misc_en_low,
|
||||
&header->pmode_misc_en_high))
|
||||
header->pmode_behavior |=
|
||||
(1 << WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE);
|
||||
header->realmode_flags = acpi_realmode_flags;
|
||||
header->real_magic = 0x12345678;
|
||||
|
||||
|
@ -294,6 +294,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),
|
||||
},
|
||||
},
|
||||
{ /* Handle reboot issue on Acer Aspire one */
|
||||
.callback = set_bios_reboot,
|
||||
.ident = "Acer Aspire One A110",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -504,9 +504,6 @@ void __init efi_init(void)
|
||||
x86_platform.set_wallclock = efi_set_rtc_mmss;
|
||||
#endif
|
||||
|
||||
/* Setup for EFI runtime service */
|
||||
reboot_type = BOOT_EFI;
|
||||
|
||||
#if EFI_DEBUG
|
||||
print_efi_memmap();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user