diff options
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mshyperv.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/vmware.c | 2 |
3 files changed, 16 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 8c66d2fc8f81..36d2696c9563 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -485,7 +485,7 @@ static void mce_report_event(struct pt_regs *regs) | |||
485 | * be somewhat complicated (e.g. segment offset would require an instruction | 485 | * be somewhat complicated (e.g. segment offset would require an instruction |
486 | * parser). So only support physical addresses up to page granuality for now. | 486 | * parser). So only support physical addresses up to page granuality for now. |
487 | */ | 487 | */ |
488 | static int mce_usable_address(struct mce *m) | 488 | int mce_usable_address(struct mce *m) |
489 | { | 489 | { |
490 | if (!(m->status & MCI_STATUS_ADDRV)) | 490 | if (!(m->status & MCI_STATUS_ADDRV)) |
491 | return 0; | 491 | return 0; |
@@ -505,6 +505,7 @@ static int mce_usable_address(struct mce *m) | |||
505 | 505 | ||
506 | return 1; | 506 | return 1; |
507 | } | 507 | } |
508 | EXPORT_SYMBOL_GPL(mce_usable_address); | ||
508 | 509 | ||
509 | bool mce_is_memory_error(struct mce *m) | 510 | bool mce_is_memory_error(struct mce *m) |
510 | { | 511 | { |
@@ -534,7 +535,7 @@ bool mce_is_memory_error(struct mce *m) | |||
534 | } | 535 | } |
535 | EXPORT_SYMBOL_GPL(mce_is_memory_error); | 536 | EXPORT_SYMBOL_GPL(mce_is_memory_error); |
536 | 537 | ||
537 | static bool mce_is_correctable(struct mce *m) | 538 | bool mce_is_correctable(struct mce *m) |
538 | { | 539 | { |
539 | if (m->cpuvendor == X86_VENDOR_AMD && m->status & MCI_STATUS_DEFERRED) | 540 | if (m->cpuvendor == X86_VENDOR_AMD && m->status & MCI_STATUS_DEFERRED) |
540 | return false; | 541 | return false; |
@@ -547,6 +548,7 @@ static bool mce_is_correctable(struct mce *m) | |||
547 | 548 | ||
548 | return true; | 549 | return true; |
549 | } | 550 | } |
551 | EXPORT_SYMBOL_GPL(mce_is_correctable); | ||
550 | 552 | ||
551 | static bool cec_add_mce(struct mce *m) | 553 | static bool cec_add_mce(struct mce *m) |
552 | { | 554 | { |
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 1c72f3819eb1..e81a2db42df7 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <linux/i8253.h> | ||
23 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
24 | #include <asm/hypervisor.h> | 25 | #include <asm/hypervisor.h> |
25 | #include <asm/hyperv-tlfs.h> | 26 | #include <asm/hyperv-tlfs.h> |
@@ -295,6 +296,16 @@ static void __init ms_hyperv_init_platform(void) | |||
295 | if (efi_enabled(EFI_BOOT)) | 296 | if (efi_enabled(EFI_BOOT)) |
296 | x86_platform.get_nmi_reason = hv_get_nmi_reason; | 297 | x86_platform.get_nmi_reason = hv_get_nmi_reason; |
297 | 298 | ||
299 | /* | ||
300 | * Hyper-V VMs have a PIT emulation quirk such that zeroing the | ||
301 | * counter register during PIT shutdown restarts the PIT. So it | ||
302 | * continues to interrupt @18.2 HZ. Setting i8253_clear_counter | ||
303 | * to false tells pit_shutdown() not to zero the counter so that | ||
304 | * the PIT really is shutdown. Generation 2 VMs don't have a PIT, | ||
305 | * and setting this value has no effect. | ||
306 | */ | ||
307 | i8253_clear_counter_on_shutdown = false; | ||
308 | |||
298 | #if IS_ENABLED(CONFIG_HYPERV) | 309 | #if IS_ENABLED(CONFIG_HYPERV) |
299 | /* | 310 | /* |
300 | * Setup the hook to get control post apic initialization. | 311 | * Setup the hook to get control post apic initialization. |
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index d9ab49bed8af..0eda91f8eeac 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c | |||
@@ -77,7 +77,7 @@ static __init int setup_vmw_sched_clock(char *s) | |||
77 | } | 77 | } |
78 | early_param("no-vmw-sched-clock", setup_vmw_sched_clock); | 78 | early_param("no-vmw-sched-clock", setup_vmw_sched_clock); |
79 | 79 | ||
80 | static unsigned long long vmware_sched_clock(void) | 80 | static unsigned long long notrace vmware_sched_clock(void) |
81 | { | 81 | { |
82 | unsigned long long ns; | 82 | unsigned long long ns; |
83 | 83 | ||