Commit 7dc9b6b8 authored by Michael Kelley's avatar Michael Kelley Committed by Greg Kroah-Hartman

Drivers: hv: vmbus: Make TLFS #define names architecture neutral

The Hyper-V feature and hint flags in hyperv-tlfs.h are all defined
with the string "X64" in the name.  Some of these flags are indeed
x86/x64 specific, but others are not.  For the ones that are used
in architecture independent Hyper-V driver code, or will be used in
the upcoming support for Hyper-V for ARM64, this patch removes the
"X64" from the name.

This patch changes the flags that are currently known to be
used on multiple architectures. Hyper-V for ARM64 is still a
work-in-progress and the Top Level Functional Spec (TLFS) has not
been separated into x86/x64 and ARM64 areas.  So additional flags
may need to be updated later.

This patch only changes symbol names.  There are no functional
changes.
Signed-off-by: default avatarMichael Kelley <mikelley@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07136793
...@@ -330,7 +330,7 @@ void __init hyperv_init(void) ...@@ -330,7 +330,7 @@ void __init hyperv_init(void)
* Register Hyper-V specific clocksource. * Register Hyper-V specific clocksource.
*/ */
#ifdef CONFIG_HYPERV_TSCPAGE #ifdef CONFIG_HYPERV_TSCPAGE
if (ms_hyperv.features & HV_X64_MSR_REFERENCE_TSC_AVAILABLE) { if (ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE) {
union hv_x64_msr_hypercall_contents tsc_msr; union hv_x64_msr_hypercall_contents tsc_msr;
tsc_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL); tsc_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL);
...@@ -359,7 +359,7 @@ void __init hyperv_init(void) ...@@ -359,7 +359,7 @@ void __init hyperv_init(void)
*/ */
hyperv_cs = &hyperv_cs_msr; hyperv_cs = &hyperv_cs_msr;
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE) if (ms_hyperv.features & HV_MSR_TIME_REF_COUNT_AVAILABLE)
clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100); clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100);
return; return;
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
/* VP Runtime (HV_X64_MSR_VP_RUNTIME) available */ /* VP Runtime (HV_X64_MSR_VP_RUNTIME) available */
#define HV_X64_MSR_VP_RUNTIME_AVAILABLE (1 << 0) #define HV_X64_MSR_VP_RUNTIME_AVAILABLE (1 << 0)
/* Partition Reference Counter (HV_X64_MSR_TIME_REF_COUNT) available*/ /* Partition Reference Counter (HV_X64_MSR_TIME_REF_COUNT) available*/
#define HV_X64_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1) #define HV_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1)
/* Partition reference TSC MSR is available */ /* Partition reference TSC MSR is available */
#define HV_X64_MSR_REFERENCE_TSC_AVAILABLE (1 << 9) #define HV_MSR_REFERENCE_TSC_AVAILABLE (1 << 9)
/* A partition's reference time stamp counter (TSC) page */ /* A partition's reference time stamp counter (TSC) page */
#define HV_X64_MSR_REFERENCE_TSC 0x40000021 #define HV_X64_MSR_REFERENCE_TSC 0x40000021
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
* Synthetic Timer MSRs (HV_X64_MSR_STIMER0_CONFIG through * Synthetic Timer MSRs (HV_X64_MSR_STIMER0_CONFIG through
* HV_X64_MSR_STIMER3_COUNT) available * HV_X64_MSR_STIMER3_COUNT) available
*/ */
#define HV_X64_MSR_SYNTIMER_AVAILABLE (1 << 3) #define HV_MSR_SYNTIMER_AVAILABLE (1 << 3)
/* /*
* APIC access MSRs (HV_X64_MSR_EOI, HV_X64_MSR_ICR and HV_X64_MSR_TPR) * APIC access MSRs (HV_X64_MSR_EOI, HV_X64_MSR_ICR and HV_X64_MSR_TPR)
* are available * are available
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
#define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE (1 << 10) #define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE (1 << 10)
/* stimer Direct Mode is available */ /* stimer Direct Mode is available */
#define HV_X64_STIMER_DIRECT_MODE_AVAILABLE (1 << 19) #define HV_STIMER_DIRECT_MODE_AVAILABLE (1 << 19)
/* /*
* Feature identification: EBX indicates which flags were specified at * Feature identification: EBX indicates which flags were specified at
...@@ -160,9 +160,9 @@ ...@@ -160,9 +160,9 @@
#define HV_X64_RELAXED_TIMING_RECOMMENDED (1 << 5) #define HV_X64_RELAXED_TIMING_RECOMMENDED (1 << 5)
/* /*
* Virtual APIC support * Recommend not using Auto End-Of-Interrupt feature
*/ */
#define HV_X64_DEPRECATING_AEOI_RECOMMENDED (1 << 9) #define HV_DEPRECATING_AEOI_RECOMMENDED (1 << 9)
/* /*
* Recommend using cluster IPI hypercalls. * Recommend using cluster IPI hypercalls.
......
...@@ -50,7 +50,7 @@ __visible void __irq_entry hyperv_vector_handler(struct pt_regs *regs) ...@@ -50,7 +50,7 @@ __visible void __irq_entry hyperv_vector_handler(struct pt_regs *regs)
if (vmbus_handler) if (vmbus_handler)
vmbus_handler(); vmbus_handler();
if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED) if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
ack_APIC_irq(); ack_APIC_irq();
exiting_irq(); exiting_irq();
...@@ -300,7 +300,7 @@ static void __init ms_hyperv_init_platform(void) ...@@ -300,7 +300,7 @@ static void __init ms_hyperv_init_platform(void)
hyperv_reenlightenment_vector); hyperv_reenlightenment_vector);
/* Setup the IDT for stimer0 */ /* Setup the IDT for stimer0 */
if (ms_hyperv.misc_features & HV_X64_STIMER_DIRECT_MODE_AVAILABLE) if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE)
alloc_intr_gate(HYPERV_STIMER0_VECTOR, alloc_intr_gate(HYPERV_STIMER0_VECTOR,
hv_stimer0_callback_vector); hv_stimer0_callback_vector);
#endif #endif
......
...@@ -64,7 +64,7 @@ int hv_init(void) ...@@ -64,7 +64,7 @@ int hv_init(void)
return -ENOMEM; return -ENOMEM;
direct_mode_enabled = ms_hyperv.misc_features & direct_mode_enabled = ms_hyperv.misc_features &
HV_X64_STIMER_DIRECT_MODE_AVAILABLE; HV_STIMER_DIRECT_MODE_AVAILABLE;
return 0; return 0;
} }
...@@ -302,7 +302,7 @@ int hv_synic_init(unsigned int cpu) ...@@ -302,7 +302,7 @@ int hv_synic_init(unsigned int cpu)
shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR; shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
shared_sint.masked = false; shared_sint.masked = false;
if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED) if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
shared_sint.auto_eoi = false; shared_sint.auto_eoi = false;
else else
shared_sint.auto_eoi = true; shared_sint.auto_eoi = true;
...@@ -320,7 +320,7 @@ int hv_synic_init(unsigned int cpu) ...@@ -320,7 +320,7 @@ int hv_synic_init(unsigned int cpu)
/* /*
* Register the per-cpu clockevent source. * Register the per-cpu clockevent source.
*/ */
if (ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE) if (ms_hyperv.features & HV_MSR_SYNTIMER_AVAILABLE)
clockevents_config_and_register(hv_cpu->clk_evt, clockevents_config_and_register(hv_cpu->clk_evt,
HV_TIMER_FREQUENCY, HV_TIMER_FREQUENCY,
HV_MIN_DELTA_TICKS, HV_MIN_DELTA_TICKS,
...@@ -335,7 +335,7 @@ void hv_synic_clockevents_cleanup(void) ...@@ -335,7 +335,7 @@ void hv_synic_clockevents_cleanup(void)
{ {
int cpu; int cpu;
if (!(ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE)) if (!(ms_hyperv.features & HV_MSR_SYNTIMER_AVAILABLE))
return; return;
if (direct_mode_enabled) if (direct_mode_enabled)
...@@ -394,7 +394,7 @@ int hv_synic_cleanup(unsigned int cpu) ...@@ -394,7 +394,7 @@ int hv_synic_cleanup(unsigned int cpu)
return -EBUSY; return -EBUSY;
/* Turn off clockevent device */ /* Turn off clockevent device */
if (ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE) { if (ms_hyperv.features & HV_MSR_SYNTIMER_AVAILABLE) {
struct hv_per_cpu_context *hv_cpu struct hv_per_cpu_context *hv_cpu
= this_cpu_ptr(hv_context.cpu_context); = this_cpu_ptr(hv_context.cpu_context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment