x86/hyperv: Make hv_get_nmi_reason public
authorSaurabh Sengar <ssengar@linux.microsoft.com>
Tue, 11 Apr 2023 05:55:30 +0000 (22:55 -0700)
committerWei Liu <wei.liu@kernel.org>
Tue, 18 Apr 2023 17:29:52 +0000 (17:29 +0000)
Move hv_get_nmi_reason to .h file so it can be used in other
modules as well.

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1681192532-15460-4-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
arch/x86/include/asm/mshyperv.h
arch/x86/kernel/cpu/mshyperv.c

index e3cef98a014201ce8e23df5586818561c9707724..67f8386c1775cf0aee4c457b1f2ed357c1399c27 100644 (file)
@@ -29,6 +29,11 @@ typedef int (*hyperv_fill_flush_list_func)(
 
 void hyperv_vector_handler(struct pt_regs *regs);
 
+static inline unsigned char hv_get_nmi_reason(void)
+{
+       return 0;
+}
+
 #if IS_ENABLED(CONFIG_HYPERV)
 extern int hyperv_init_cpuhp;
 
index ac630ecde79545d466080e7f06d84b0b593f601b..c8a0e70cc484d8bd35152a69cc17364e370e6492 100644 (file)
@@ -248,11 +248,6 @@ static uint32_t  __init ms_hyperv_platform(void)
        return HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS;
 }
 
-static unsigned char hv_get_nmi_reason(void)
-{
-       return 0;
-}
-
 #ifdef CONFIG_X86_LOCAL_APIC
 /*
  * Prior to WS2016 Debug-VM sends NMIs to all CPUs which makes