| .. | .. |
|---|
| 10 | 10 | #include <linux/sched.h> |
|---|
| 11 | 11 | #include <linux/tboot.h> |
|---|
| 12 | 12 | #include <linux/delay.h> |
|---|
| 13 | | -#include <linux/frame.h> |
|---|
| 13 | +#include <linux/objtool.h> |
|---|
| 14 | +#include <linux/pgtable.h> |
|---|
| 14 | 15 | #include <acpi/reboot.h> |
|---|
| 15 | 16 | #include <asm/io.h> |
|---|
| 16 | 17 | #include <asm/apic.h> |
|---|
| 17 | 18 | #include <asm/io_apic.h> |
|---|
| 18 | 19 | #include <asm/desc.h> |
|---|
| 19 | 20 | #include <asm/hpet.h> |
|---|
| 20 | | -#include <asm/pgtable.h> |
|---|
| 21 | 21 | #include <asm/proto.h> |
|---|
| 22 | 22 | #include <asm/reboot_fixups.h> |
|---|
| 23 | 23 | #include <asm/reboot.h> |
|---|
| .. | .. |
|---|
| 113 | 113 | spin_unlock(&rtc_lock); |
|---|
| 114 | 114 | |
|---|
| 115 | 115 | /* |
|---|
| 116 | | - * Switch back to the initial page table. |
|---|
| 116 | + * Switch to the trampoline page table. |
|---|
| 117 | 117 | */ |
|---|
| 118 | | -#ifdef CONFIG_X86_32 |
|---|
| 119 | | - load_cr3(initial_page_table); |
|---|
| 120 | | -#else |
|---|
| 121 | | - write_cr3(real_mode_header->trampoline_pgd); |
|---|
| 122 | | - |
|---|
| 123 | | - /* Exiting long mode will fail if CR4.PCIDE is set. */ |
|---|
| 124 | | - if (static_cpu_has(X86_FEATURE_PCID)) |
|---|
| 125 | | - cr4_clear_bits(X86_CR4_PCIDE); |
|---|
| 126 | | -#endif |
|---|
| 118 | + load_trampoline_pgtable(); |
|---|
| 127 | 119 | |
|---|
| 128 | 120 | /* Jump to the identity-mapped low memory code */ |
|---|
| 129 | 121 | #ifdef CONFIG_X86_32 |
|---|
| .. | .. |
|---|
| 563 | 555 | |
|---|
| 564 | 556 | /* Halt and exit VMX root operation on the other CPUs. */ |
|---|
| 565 | 557 | nmi_shootdown_cpus(vmxoff_nmi); |
|---|
| 566 | | - |
|---|
| 567 | 558 | } |
|---|
| 568 | 559 | } |
|---|
| 569 | 560 | |
|---|
| .. | .. |
|---|
| 655 | 646 | |
|---|
| 656 | 647 | case BOOT_CF9_FORCE: |
|---|
| 657 | 648 | port_cf9_safe = true; |
|---|
| 658 | | - /* Fall through */ |
|---|
| 649 | + fallthrough; |
|---|
| 659 | 650 | |
|---|
| 660 | 651 | case BOOT_CF9_SAFE: |
|---|
| 661 | 652 | if (port_cf9_safe) { |
|---|
| .. | .. |
|---|
| 837 | 828 | return NMI_HANDLED; |
|---|
| 838 | 829 | } |
|---|
| 839 | 830 | |
|---|
| 840 | | -static void smp_send_nmi_allbutself(void) |
|---|
| 841 | | -{ |
|---|
| 842 | | - apic->send_IPI_allbutself(NMI_VECTOR); |
|---|
| 843 | | -} |
|---|
| 844 | | - |
|---|
| 845 | 831 | /* |
|---|
| 846 | 832 | * Halt all other CPUs, calling the specified function on each of them |
|---|
| 847 | 833 | * |
|---|
| .. | .. |
|---|
| 870 | 856 | */ |
|---|
| 871 | 857 | wmb(); |
|---|
| 872 | 858 | |
|---|
| 873 | | - smp_send_nmi_allbutself(); |
|---|
| 859 | + apic_send_IPI_allbutself(NMI_VECTOR); |
|---|
| 874 | 860 | |
|---|
| 875 | 861 | /* Kick CPUs looping in NMI context. */ |
|---|
| 876 | 862 | WRITE_ONCE(crash_ipi_issued, 1); |
|---|