From nobody Fri Apr 17 09:26:10 2026 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 9B02CC4332F for ; Thu, 17 Nov 2022 10:48:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239165AbiKQKsw (ORCPT ); Thu, 17 Nov 2022 05:48:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234851AbiKQKsi (ORCPT ); Thu, 17 Nov 2022 05:48:38 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 470866450; Thu, 17 Nov 2022 02:48:35 -0800 (PST) Date: Thu, 17 Nov 2022 10:48:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668682113; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NGMrXryM4O7/O3wJE9j6fSOZ5sPkDqtPXocsCfQsU8Y=; b=elTeZQPNX0LPLfpOx4o6v9vAsztSzR7XbEio5+FjL5bQPLN6zImcalXugpHiZrhHf2Fek3 d7jlGFATWDwIfRXzVRmT8Xm1WhKPm7pOc9YtiCl8kgzsro7+0wZy2mQ3THliCoZEBMu2JR YGYOnip0Dlo60COH9xAHtEJKCasezxMX17fGiL/dd3bhh5IzDzcZYC3WlhtkB4AICSr3sb wKlI4ejwI5uh/gG6fr83xZVxGsBPAVTgVbqZU/85owWEp62nP79siko+schpaJsZhkreue lSsUNWsaDT7EL996CX2Y7koqvTV7vLZL7I1Jp88lHXZc36Pk8G9N15xmRpXyDA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668682113; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NGMrXryM4O7/O3wJE9j6fSOZ5sPkDqtPXocsCfQsU8Y=; b=+UeVv0dgwJN3kOi69kdTcvcdmc069iNeVoRVWehH0QT1i6Zl8TK3r7L7PD6/XojrIxDgYL 6MOZ9YYerotidwAA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h Cc: Thomas Gleixner , Michael Kelley , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <87fsemtut0.ffs@tglx> References: <87fsemtut0.ffs@tglx> MIME-Version: 1.0 Message-ID: <166868211189.4906.13092844425377353975.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: d3fe5c2f206148f86f85f56671109a3118bf0d2b Gitweb: https://git.kernel.org/tip/d3fe5c2f206148f86f85f56671109a311= 8bf0d2b Author: Thomas Gleixner AuthorDate: Sun, 13 Nov 2022 22:21:15 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 17 Nov 2022 11:41:19 +01:00 clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h clocksource/hyperv_timer.h is included into the VDSO build. It includes asm/mshyperv.h which in turn includes the world and some more. This worked so far by chance, but any subtle change in the include chain results in a build breakage because VDSO builds are building user space libraries. Include asm/hyperv-tlfs.h instead which contains everything what the VDSO build needs except the hv_get_raw_timer() define. Move this define into a separate header file, which contains the prerequisites (msr.h) and is included by clocksource/hyperv_timer.h. Fixup drivers/hv/vmbus_drv.c which relies on the indirect include of asm/mshyperv.h. With that the VDSO build only pulls in the minimum requirements. Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/87fsemtut0.ffs@tglx --- arch/x86/include/asm/hyperv_timer.h | 9 +++++++++ arch/x86/include/asm/mshyperv.h | 2 -- drivers/hv/vmbus_drv.c | 1 + include/clocksource/hyperv_timer.h | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 arch/x86/include/asm/hyperv_timer.h diff --git a/arch/x86/include/asm/hyperv_timer.h b/arch/x86/include/asm/hyp= erv_timer.h new file mode 100644 index 0000000..388fa81 --- /dev/null +++ b/arch/x86/include/asm/hyperv_timer.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_X86_HYPERV_TIMER_H +#define _ASM_X86_HYPERV_TIMER_H + +#include + +#define hv_get_raw_timer() rdtsc_ordered() + +#endif diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyper= v.h index 61f0c20..6d502f3 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -19,8 +19,6 @@ typedef int (*hyperv_fill_flush_list_func)( struct hv_guest_mapping_flush_list *flush, void *data); =20 -#define hv_get_raw_timer() rdtsc_ordered() - void hyperv_vector_handler(struct pt_regs *regs); =20 #if IS_ENABLED(CONFIG_HYPERV) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 8b2e413..1f5d37a 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "hyperv_vmbus.h" =20 struct vmbus_dynid { diff --git a/include/clocksource/hyperv_timer.h b/include/clocksource/hyper= v_timer.h index b3f5d73..b4a3935 100644 --- a/include/clocksource/hyperv_timer.h +++ b/include/clocksource/hyperv_timer.h @@ -15,13 +15,15 @@ =20 #include #include -#include +#include =20 #define HV_MAX_MAX_DELTA_TICKS 0xffffffff #define HV_MIN_DELTA_TICKS 1 =20 #ifdef CONFIG_HYPERV_TIMER =20 +#include + /* Routines called by the VMbus driver */ extern int hv_stimer_alloc(bool have_percpu_irqs); extern int hv_stimer_cleanup(unsigned int cpu);