Loading arch/x86/Makefile +2 −2 Original line number Original line Diff line number Diff line Loading @@ -250,8 +250,8 @@ archclean: PHONY += kvmconfig PHONY += kvmconfig kvmconfig: kvmconfig: $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config $(Q)yes "" | $(MAKE) oldconfig $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig define archhelp define archhelp echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' Loading arch/x86/kernel/early-quirks.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -240,7 +240,7 @@ static u32 __init intel_stolen_base(int num, int slot, int func, size_t stolen_s return base; return base; } } #define KB(x) ((x) * 1024) #define KB(x) ((x) * 1024UL) #define MB(x) (KB (KB (x))) #define MB(x) (KB (KB (x))) #define GB(x) (MB (KB (x))) #define GB(x) (MB (KB (x))) Loading arch/x86/kernel/reboot.c +37 −35 Original line number Original line Diff line number Diff line Loading @@ -114,8 +114,8 @@ EXPORT_SYMBOL(machine_real_restart); */ */ static int __init set_pci_reboot(const struct dmi_system_id *d) static int __init set_pci_reboot(const struct dmi_system_id *d) { { if (reboot_type != BOOT_CF9) { if (reboot_type != BOOT_CF9_FORCE) { reboot_type = BOOT_CF9; reboot_type = BOOT_CF9_FORCE; pr_info("%s series board detected. Selecting %s-method for reboots.\n", pr_info("%s series board detected. Selecting %s-method for reboots.\n", d->ident, "PCI"); d->ident, "PCI"); } } Loading Loading @@ -458,20 +458,23 @@ void __attribute__((weak)) mach_reboot_fixups(void) } } /* /* * Windows compatible x86 hardware expects the following on reboot: * To the best of our knowledge Windows compatible x86 hardware expects * the following on reboot: * * * 1) If the FADT has the ACPI reboot register flag set, try it * 1) If the FADT has the ACPI reboot register flag set, try it * 2) If still alive, write to the keyboard controller * 2) If still alive, write to the keyboard controller * 3) If still alive, write to the ACPI reboot register again * 3) If still alive, write to the ACPI reboot register again * 4) If still alive, write to the keyboard controller again * 4) If still alive, write to the keyboard controller again * 5) If still alive, call the EFI runtime service to reboot * 5) If still alive, call the EFI runtime service to reboot * 6) If still alive, write to the PCI IO port 0xCF9 to reboot * 6) If no EFI runtime service, call the BIOS to do a reboot * 7) If still alive, inform BIOS to do a proper reboot * * * If the machine is still alive at this stage, it gives up. We default to * We default to following the same pattern. We also have * following the same pattern, except that if we're still alive after (7) we'll * two other reboot methods: 'triple fault' and 'PCI', which * try to force a triple fault and then cycle between hitting the keyboard * can be triggered via the reboot= kernel boot option or * controller and doing that * via quirks. * * This means that this function can never return, it can misbehave * by not rebooting properly and hanging. */ */ static void native_machine_emergency_restart(void) static void native_machine_emergency_restart(void) { { Loading @@ -492,6 +495,11 @@ static void native_machine_emergency_restart(void) for (;;) { for (;;) { /* Could also try the reset bit in the Hammer NB */ /* Could also try the reset bit in the Hammer NB */ switch (reboot_type) { switch (reboot_type) { case BOOT_ACPI: acpi_reboot(); reboot_type = BOOT_KBD; break; case BOOT_KBD: case BOOT_KBD: mach_reboot_fixups(); /* For board specific fixups */ mach_reboot_fixups(); /* For board specific fixups */ Loading @@ -509,43 +517,29 @@ static void native_machine_emergency_restart(void) } } break; break; case BOOT_TRIPLE: load_idt(&no_idt); __asm__ __volatile__("int3"); /* We're probably dead after this, but... */ reboot_type = BOOT_KBD; break; case BOOT_BIOS: machine_real_restart(MRR_BIOS); /* We're probably dead after this, but... */ reboot_type = BOOT_TRIPLE; break; case BOOT_ACPI: acpi_reboot(); reboot_type = BOOT_KBD; break; case BOOT_EFI: case BOOT_EFI: if (efi_enabled(EFI_RUNTIME_SERVICES)) if (efi_enabled(EFI_RUNTIME_SERVICES)) efi.reset_system(reboot_mode == REBOOT_WARM ? efi.reset_system(reboot_mode == REBOOT_WARM ? EFI_RESET_WARM : EFI_RESET_WARM : EFI_RESET_COLD, EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); EFI_SUCCESS, 0, NULL); reboot_type = BOOT_CF9_COND; reboot_type = BOOT_BIOS; break; case BOOT_BIOS: machine_real_restart(MRR_BIOS); /* We're probably dead after this, but... */ reboot_type = BOOT_CF9_SAFE; break; break; case BOOT_CF9: case BOOT_CF9_FORCE: port_cf9_safe = true; port_cf9_safe = true; /* Fall through */ /* Fall through */ case BOOT_CF9_COND: case BOOT_CF9_SAFE: if (port_cf9_safe) { if (port_cf9_safe) { u8 reboot_code = reboot_mode == REBOOT_WARM ? u8 reboot_code = reboot_mode == REBOOT_WARM ? 0x06 : 0x0E; 0x06 : 0x0E; u8 cf9 = inb(0xcf9) & ~reboot_code; u8 cf9 = inb(0xcf9) & ~reboot_code; outb(cf9|2, 0xcf9); /* Request hard reset */ outb(cf9|2, 0xcf9); /* Request hard reset */ udelay(50); udelay(50); Loading @@ -553,7 +547,15 @@ static void native_machine_emergency_restart(void) outb(cf9|reboot_code, 0xcf9); outb(cf9|reboot_code, 0xcf9); udelay(50); udelay(50); } } reboot_type = BOOT_BIOS; reboot_type = BOOT_TRIPLE; break; case BOOT_TRIPLE: load_idt(&no_idt); __asm__ __volatile__("int3"); /* We're probably dead after this, but... */ reboot_type = BOOT_KBD; break; break; } } } } Loading arch/x86/mm/pgtable.c +14 −7 Original line number Original line Diff line number Diff line Loading @@ -399,13 +399,20 @@ int pmdp_test_and_clear_young(struct vm_area_struct *vma, int ptep_clear_flush_young(struct vm_area_struct *vma, int ptep_clear_flush_young(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) unsigned long address, pte_t *ptep) { { int young; /* * On x86 CPUs, clearing the accessed bit without a TLB flush young = ptep_test_and_clear_young(vma, address, ptep); * doesn't cause data corruption. [ It could cause incorrect if (young) * page aging and the (mistaken) reclaim of hot pages, but the flush_tlb_page(vma, address); * chance of that should be relatively low. ] * return young; * So as a performance optimization don't flush the TLB when * clearing the accessed bit, it will eventually be flushed by * a context switch or a VM operation anyway. [ In the rare * event of it not getting flushed for a long time the delay * shouldn't really matter because there's no real memory * pressure for swapout to react to. ] */ return ptep_test_and_clear_young(vma, address, ptep); } } #ifdef CONFIG_TRANSPARENT_HUGEPAGE #ifdef CONFIG_TRANSPARENT_HUGEPAGE Loading arch/x86/syscalls/Makefile +2 −0 Original line number Original line Diff line number Diff line Loading @@ -54,5 +54,7 @@ syshdr-$(CONFIG_X86_64) += syscalls_64.h targets += $(uapisyshdr-y) $(syshdr-y) targets += $(uapisyshdr-y) $(syshdr-y) PHONY += all all: $(addprefix $(uapi)/,$(uapisyshdr-y)) all: $(addprefix $(uapi)/,$(uapisyshdr-y)) all: $(addprefix $(out)/,$(syshdr-y)) all: $(addprefix $(out)/,$(syshdr-y)) @: Loading
arch/x86/Makefile +2 −2 Original line number Original line Diff line number Diff line Loading @@ -250,8 +250,8 @@ archclean: PHONY += kvmconfig PHONY += kvmconfig kvmconfig: kvmconfig: $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config $(Q)yes "" | $(MAKE) oldconfig $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig define archhelp define archhelp echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' Loading
arch/x86/kernel/early-quirks.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -240,7 +240,7 @@ static u32 __init intel_stolen_base(int num, int slot, int func, size_t stolen_s return base; return base; } } #define KB(x) ((x) * 1024) #define KB(x) ((x) * 1024UL) #define MB(x) (KB (KB (x))) #define MB(x) (KB (KB (x))) #define GB(x) (MB (KB (x))) #define GB(x) (MB (KB (x))) Loading
arch/x86/kernel/reboot.c +37 −35 Original line number Original line Diff line number Diff line Loading @@ -114,8 +114,8 @@ EXPORT_SYMBOL(machine_real_restart); */ */ static int __init set_pci_reboot(const struct dmi_system_id *d) static int __init set_pci_reboot(const struct dmi_system_id *d) { { if (reboot_type != BOOT_CF9) { if (reboot_type != BOOT_CF9_FORCE) { reboot_type = BOOT_CF9; reboot_type = BOOT_CF9_FORCE; pr_info("%s series board detected. Selecting %s-method for reboots.\n", pr_info("%s series board detected. Selecting %s-method for reboots.\n", d->ident, "PCI"); d->ident, "PCI"); } } Loading Loading @@ -458,20 +458,23 @@ void __attribute__((weak)) mach_reboot_fixups(void) } } /* /* * Windows compatible x86 hardware expects the following on reboot: * To the best of our knowledge Windows compatible x86 hardware expects * the following on reboot: * * * 1) If the FADT has the ACPI reboot register flag set, try it * 1) If the FADT has the ACPI reboot register flag set, try it * 2) If still alive, write to the keyboard controller * 2) If still alive, write to the keyboard controller * 3) If still alive, write to the ACPI reboot register again * 3) If still alive, write to the ACPI reboot register again * 4) If still alive, write to the keyboard controller again * 4) If still alive, write to the keyboard controller again * 5) If still alive, call the EFI runtime service to reboot * 5) If still alive, call the EFI runtime service to reboot * 6) If still alive, write to the PCI IO port 0xCF9 to reboot * 6) If no EFI runtime service, call the BIOS to do a reboot * 7) If still alive, inform BIOS to do a proper reboot * * * If the machine is still alive at this stage, it gives up. We default to * We default to following the same pattern. We also have * following the same pattern, except that if we're still alive after (7) we'll * two other reboot methods: 'triple fault' and 'PCI', which * try to force a triple fault and then cycle between hitting the keyboard * can be triggered via the reboot= kernel boot option or * controller and doing that * via quirks. * * This means that this function can never return, it can misbehave * by not rebooting properly and hanging. */ */ static void native_machine_emergency_restart(void) static void native_machine_emergency_restart(void) { { Loading @@ -492,6 +495,11 @@ static void native_machine_emergency_restart(void) for (;;) { for (;;) { /* Could also try the reset bit in the Hammer NB */ /* Could also try the reset bit in the Hammer NB */ switch (reboot_type) { switch (reboot_type) { case BOOT_ACPI: acpi_reboot(); reboot_type = BOOT_KBD; break; case BOOT_KBD: case BOOT_KBD: mach_reboot_fixups(); /* For board specific fixups */ mach_reboot_fixups(); /* For board specific fixups */ Loading @@ -509,43 +517,29 @@ static void native_machine_emergency_restart(void) } } break; break; case BOOT_TRIPLE: load_idt(&no_idt); __asm__ __volatile__("int3"); /* We're probably dead after this, but... */ reboot_type = BOOT_KBD; break; case BOOT_BIOS: machine_real_restart(MRR_BIOS); /* We're probably dead after this, but... */ reboot_type = BOOT_TRIPLE; break; case BOOT_ACPI: acpi_reboot(); reboot_type = BOOT_KBD; break; case BOOT_EFI: case BOOT_EFI: if (efi_enabled(EFI_RUNTIME_SERVICES)) if (efi_enabled(EFI_RUNTIME_SERVICES)) efi.reset_system(reboot_mode == REBOOT_WARM ? efi.reset_system(reboot_mode == REBOOT_WARM ? EFI_RESET_WARM : EFI_RESET_WARM : EFI_RESET_COLD, EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); EFI_SUCCESS, 0, NULL); reboot_type = BOOT_CF9_COND; reboot_type = BOOT_BIOS; break; case BOOT_BIOS: machine_real_restart(MRR_BIOS); /* We're probably dead after this, but... */ reboot_type = BOOT_CF9_SAFE; break; break; case BOOT_CF9: case BOOT_CF9_FORCE: port_cf9_safe = true; port_cf9_safe = true; /* Fall through */ /* Fall through */ case BOOT_CF9_COND: case BOOT_CF9_SAFE: if (port_cf9_safe) { if (port_cf9_safe) { u8 reboot_code = reboot_mode == REBOOT_WARM ? u8 reboot_code = reboot_mode == REBOOT_WARM ? 0x06 : 0x0E; 0x06 : 0x0E; u8 cf9 = inb(0xcf9) & ~reboot_code; u8 cf9 = inb(0xcf9) & ~reboot_code; outb(cf9|2, 0xcf9); /* Request hard reset */ outb(cf9|2, 0xcf9); /* Request hard reset */ udelay(50); udelay(50); Loading @@ -553,7 +547,15 @@ static void native_machine_emergency_restart(void) outb(cf9|reboot_code, 0xcf9); outb(cf9|reboot_code, 0xcf9); udelay(50); udelay(50); } } reboot_type = BOOT_BIOS; reboot_type = BOOT_TRIPLE; break; case BOOT_TRIPLE: load_idt(&no_idt); __asm__ __volatile__("int3"); /* We're probably dead after this, but... */ reboot_type = BOOT_KBD; break; break; } } } } Loading
arch/x86/mm/pgtable.c +14 −7 Original line number Original line Diff line number Diff line Loading @@ -399,13 +399,20 @@ int pmdp_test_and_clear_young(struct vm_area_struct *vma, int ptep_clear_flush_young(struct vm_area_struct *vma, int ptep_clear_flush_young(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) unsigned long address, pte_t *ptep) { { int young; /* * On x86 CPUs, clearing the accessed bit without a TLB flush young = ptep_test_and_clear_young(vma, address, ptep); * doesn't cause data corruption. [ It could cause incorrect if (young) * page aging and the (mistaken) reclaim of hot pages, but the flush_tlb_page(vma, address); * chance of that should be relatively low. ] * return young; * So as a performance optimization don't flush the TLB when * clearing the accessed bit, it will eventually be flushed by * a context switch or a VM operation anyway. [ In the rare * event of it not getting flushed for a long time the delay * shouldn't really matter because there's no real memory * pressure for swapout to react to. ] */ return ptep_test_and_clear_young(vma, address, ptep); } } #ifdef CONFIG_TRANSPARENT_HUGEPAGE #ifdef CONFIG_TRANSPARENT_HUGEPAGE Loading
arch/x86/syscalls/Makefile +2 −0 Original line number Original line Diff line number Diff line Loading @@ -54,5 +54,7 @@ syshdr-$(CONFIG_X86_64) += syscalls_64.h targets += $(uapisyshdr-y) $(syshdr-y) targets += $(uapisyshdr-y) $(syshdr-y) PHONY += all all: $(addprefix $(uapi)/,$(uapisyshdr-y)) all: $(addprefix $(uapi)/,$(uapisyshdr-y)) all: $(addprefix $(out)/,$(syshdr-y)) all: $(addprefix $(out)/,$(syshdr-y)) @: