Received: by 10.192.165.148 with SMTP id m20csp3697064imm; Mon, 7 May 2018 17:39:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSRPpC4X2HiKIJFsl6e71S/CjsrvlEeBe0FusVeRVUCK3fsEB+kPB/sdcu1+7U+pxbW88a X-Received: by 2002:a65:5a07:: with SMTP id y7-v6mr31169994pgs.15.1525739940308; Mon, 07 May 2018 17:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525739940; cv=none; d=google.com; s=arc-20160816; b=B5jdWhDz6pgep2sAnwuB5QS+IMhxxQxLKNuKBylIlNwOwtltirWmSdn19lPByo+Ung EXV9ayl0vAg/Fo+PNZijfN5UZhuMnGPgazoe6MbiljCqHrMfLvFi7FKE80U2Qtwqdwm9 TDR6CeddTeYH3CazzISgVfSJ/C2IpgK7Kv3/9K45yt8qdsFzAd93WVbx2NYp+J6n/7NF p2Cm1Zt04oUVGWVAWH7a8GsJ5cqLzk8jmVPrR3I6rTOuYLzh/eDiHD05lu2HqZZt10ef dBdZkIYFUxm77VkfwlRSn9JO29vQ+IYdhX34sXtnVjLHUbuZocsukw3wWc+JeMWXhlTh fZDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=5hoTFeg+RYEE6l65gpGsFQ6sUDT//c7+uUr+VTnIht4=; b=Tlr2L85kHdiqosVBE0/SfXaF7QDREQbYftyYvTtS/bij69EBEL24AhI+81WbIXf06I ubMt0xP5X+BbN2C4eKm62MllaeHLFd7QPWokYzXmXyLcJzPW4iU45Rx16LSwZqAopFNt NETXnJitmWtbPrDnXNIqnYQbeua4S8XMpTLtO3ImizKZPN90Qq0yXLDfVASniyUJWQN7 2qHr03u9TmPviprJHWItp3o531H9I2wjbolQ1XLiELd2SsKfcaAqI3NiB35N2GrufONH 9Z8u0oQVPDvMUkfZp5fr0xHGsilf+2Cly2YndlmrGm5s5fEzu23Qr/NKThtHhCw62oKj MgfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sW1ZDWZn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d123-v6si18646970pgc.445.2018.05.07.17.38.45; Mon, 07 May 2018 17:39:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sW1ZDWZn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845AbeEHAi1 (ORCPT + 99 others); Mon, 7 May 2018 20:38:27 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:42543 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753735AbeEHAiZ (ORCPT ); Mon, 7 May 2018 20:38:25 -0400 Received: by mail-pg0-f68.google.com with SMTP id p9-v6so17474968pgc.9 for ; Mon, 07 May 2018 17:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:reply-to; bh=5hoTFeg+RYEE6l65gpGsFQ6sUDT//c7+uUr+VTnIht4=; b=sW1ZDWZnPHGmGsTMpDP6ky2AgTEFYLbDVMw1+rNxGo2PIDbQFciBgdg7fDll+ei7L9 HMAUBZnaJlaNlZGkj7cb781u+zTKDSRyGP/pEC5L3Gl5KRDWx0HzqS+3V7c640JteYav B+qopD7287u2TJIV6KttvA3mSOw8iGrjCWjh2Jzk0wJQoVRKNZPgoTCEqH3pzs4MeFfR UopxARI76CkuUsEiR48a+1nKsgDpBcgg3nmMFlKpScPCB47ZR+TXNrPPzp0ZpRJ4xQkB v8DkZp8xsCk7vIr/JNC64dSs5B/TfR0YW15+EOK2aSXxVIeD1PUhh3iBPwn0xwUebE3r LHpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:reply-to; bh=5hoTFeg+RYEE6l65gpGsFQ6sUDT//c7+uUr+VTnIht4=; b=cs6NC2c52355D7Qc9c8hl8UqZrDUjccizTI8K98p2cIO8EjgConJMJZYgiKqG2TyVl YuXPBZVPn1/KtL8SHwRrIvZjwha2bo1ap4D8ekpDDjTLFY0dTwvxhRrJSqesgV0k/OOi YHZhEF8uYnZNTllpUPv07xLk4rVF15bNUQwJiOAU5ELDJsgdPZ8k69n7g2/QGG9EZV12 XF4SZEHCzaR3DFCKF9i6wQAhFTaJHZXIEzQQYygfitSy9NRBu2CYUeoG9rc9VV4HKFOz uiSmB+L+LjYb+Xfrywemq6cUPvsBNTd3KazA7HkXjDRGHSuvaoXLWoFW+GaPGI7XB1p7 NBOw== X-Gm-Message-State: ALQs6tB0vIYNr/I1OkPjQgGSMHy8suxzD0JXIxG9vXG6yYa7W4fuwiqi joNqtqN2IZZ3ym9ub3EpqLc= X-Received: by 2002:a63:7c43:: with SMTP id l3-v6mr29557468pgn.0.1525739904577; Mon, 07 May 2018 17:38:24 -0700 (PDT) Received: from nvmetest.corp.microsoft.com ([2001:4898:80e8:6::4da]) by smtp.gmail.com with ESMTPSA id p126-v6sm37621458pga.28.2018.05.07.17.38.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 May 2018 17:38:24 -0700 (PDT) From: mhkelley58@gmail.com X-Google-Original-From: mikelley@microsoft.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, marcelo.cerri@canonical.com, sthemmin@microsoft.com, kys@microsoft.com Subject: [PATCH char-misc 2/2] Drivers: hv: vmbus: Make TLFS #define names architecture neutral Date: Mon, 7 May 2018 17:37:31 -0700 Message-Id: <1525739851-54919-3-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525739851-54919-1-git-send-email-mikelley@microsoft.com> References: <1525739851-54919-1-git-send-email-mikelley@microsoft.com> Reply-To: mikelley@microsoft.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Kelley 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: Michael Kelley --- arch/x86/hyperv/hv_init.c | 4 ++-- arch/x86/include/asm/hyperv-tlfs.h | 12 ++++++------ arch/x86/kernel/cpu/mshyperv.c | 4 ++-- drivers/hv/hv.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index cfecc22..3db8729 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -302,7 +302,7 @@ void hyperv_init(void) * Register Hyper-V specific clocksource. */ #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; tsc_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL); @@ -331,7 +331,7 @@ void hyperv_init(void) */ 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); return; diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index 416cb0e..44657e0 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -35,9 +35,9 @@ /* VP Runtime (HV_X64_MSR_VP_RUNTIME) available */ #define HV_X64_MSR_VP_RUNTIME_AVAILABLE (1 << 0) /* 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 */ -#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 */ #define HV_X64_MSR_REFERENCE_TSC 0x40000021 @@ -60,7 +60,7 @@ * Synthetic Timer MSRs (HV_X64_MSR_STIMER0_CONFIG through * 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) * are available @@ -86,7 +86,7 @@ #define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE (1 << 10) /* 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 @@ -160,9 +160,9 @@ #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 the newer ExProcessorMasks interface */ #define HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED (1 << 11) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 031082c..f99ce9d 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -50,7 +50,7 @@ void hyperv_vector_handler(struct pt_regs *regs) if (vmbus_handler) vmbus_handler(); - if (ms_hyperv.hints & HV_X64_DEPRECATING_AEOI_RECOMMENDED) + if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED) ack_APIC_irq(); exiting_irq(); @@ -300,7 +300,7 @@ static void __init ms_hyperv_init_platform(void) hyperv_reenlightenment_vector); /* 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, hv_stimer0_callback_vector); #endif diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 96c403a..c72e8d7 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -64,7 +64,7 @@ int hv_init(void) return -ENOMEM; direct_mode_enabled = ms_hyperv.misc_features & - HV_X64_STIMER_DIRECT_MODE_AVAILABLE; + HV_STIMER_DIRECT_MODE_AVAILABLE; return 0; } @@ -302,7 +302,7 @@ int hv_synic_init(unsigned int cpu) shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR; 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; else shared_sint.auto_eoi = true; @@ -320,7 +320,7 @@ int hv_synic_init(unsigned int cpu) /* * 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, HV_TIMER_FREQUENCY, HV_MIN_DELTA_TICKS, @@ -335,7 +335,7 @@ void hv_synic_clockevents_cleanup(void) { int cpu; - if (!(ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE)) + if (!(ms_hyperv.features & HV_MSR_SYNTIMER_AVAILABLE)) return; if (direct_mode_enabled) @@ -394,7 +394,7 @@ int hv_synic_cleanup(unsigned int cpu) return -EBUSY; /* 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 = this_cpu_ptr(hv_context.cpu_context); -- 2.7.4