From nobody Wed Dec 17 18:59:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2E6FC77B71 for ; Tue, 18 Apr 2023 05:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbjDRFMu (ORCPT ); Tue, 18 Apr 2023 01:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjDRFMq (ORCPT ); Tue, 18 Apr 2023 01:12:46 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B592C40E5; Mon, 17 Apr 2023 22:12:45 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 233DF21C2021; Mon, 17 Apr 2023 22:12:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 233DF21C2021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681794765; bh=jAe5ydWTNaBvjnqbWCKOjRz2xmpIzgRM0wkNQjWgDoM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M1HbQmdkh286aS7vXOm/VGrSIsRx5j5E/wDDmJhwVROFq3SyXkAJt9KzlJWC0x1JC SkFi1feXV7u+TT1BZ6eex2R8bQPtnxVu6gmPqnNudI4HCfh+hWzbIYKF/JIOVzX/M9 nY+CoQcZKYNQrf8lYZLicw7Mg0OuI9f9Otnafe0s= From: Saurabh Sengar To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tiala@microsoft.com, mikelley@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: [PATCH 1/2] x86/init: Remove static for get/set_rtc_noop() Date: Mon, 17 Apr 2023 22:12:40 -0700 Message-Id: <1681794761-13734-2-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1681794761-13734-1-git-send-email-ssengar@linux.microsoft.com> References: <1681794761-13734-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Remove static from get/set_rtc_noop() so that it can be accessed outside of the file. Signed-off-by: Saurabh Sengar --- arch/x86/kernel/x86_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index ecdeb0974a87..d82f4fa2f1bf 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -33,8 +33,8 @@ static int __init iommu_init_noop(void) { return 0; } static void iommu_shutdown_noop(void) { } bool __init bool_x86_init_noop(void) { return false; } void x86_op_int_noop(int cpu) { } -static int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } -static void get_rtc_noop(struct timespec64 *now) { } +int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } +void get_rtc_noop(struct timespec64 *now) { } =20 static __initconst const struct of_device_id of_cmos_match[] =3D { { .compatible =3D "motorola,mc146818" }, --=20 2.34.1 From nobody Wed Dec 17 18:59:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64C14C77B7C for ; Tue, 18 Apr 2023 05:12:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjDRFMs (ORCPT ); Tue, 18 Apr 2023 01:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjDRFMq (ORCPT ); Tue, 18 Apr 2023 01:12:46 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B7ACB40F0; Mon, 17 Apr 2023 22:12:45 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 3C13F21C2022; Mon, 17 Apr 2023 22:12:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3C13F21C2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681794765; bh=yRj88ka13GJpMg/3bI23hbHOSkGkGWzPUVOA10JufYg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fKigXjiBAJm9oUvMTmHO6KKqyaFUZCLKgwRTpsI75WUpZhc3DVs9fhAgGoE2P8Uy6 1MdWHoicjJos+BkgKZDIIDz20G1z30Y6soO1go1ti8UUGi5vZB2fr+KpSFcL0XCS1Z RibdynS6ROLvWkVRZpCfPE6JETAwNZuRHXmtO+cE= From: Saurabh Sengar To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tiala@microsoft.com, mikelley@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: [PATCH 2/2] x86/hyperv: Allow hv_get_nmi_reason compilation irrespective of HYPERV config Date: Mon, 17 Apr 2023 22:12:41 -0700 Message-Id: <1681794761-13734-3-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1681794761-13734-1-git-send-email-ssengar@linux.microsoft.com> References: <1681794761-13734-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Move hv_get_nmi_reason out of CONFIG_HYPERV guard, so that it can be compiled irrespective of CONFIG_HYPERV enabled or not. Signed-off-by: Saurabh Sengar --- arch/x86/include/asm/mshyperv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyper= v.h index 71ed240ef66d..67f8386c1775 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -29,6 +29,11 @@ typedef int (*hyperv_fill_flush_list_func)( =20 void hyperv_vector_handler(struct pt_regs *regs); =20 +static inline unsigned char hv_get_nmi_reason(void) +{ + return 0; +} + #if IS_ENABLED(CONFIG_HYPERV) extern int hyperv_init_cpuhp; =20 @@ -189,11 +194,6 @@ static inline struct hv_vp_assist_page *hv_get_vp_assi= st_page(unsigned int cpu) return hv_vp_assist_page[cpu]; } =20 -static inline unsigned char hv_get_nmi_reason(void) -{ - return 0; -} - void __init hyperv_init(void); void hyperv_setup_mmu_ops(void); void set_hv_tscchange_cb(void (*cb)(void)); --=20 2.34.1