Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp754003qtx; Thu, 17 Nov 2022 07:38:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7+DjbbD6PeA7ozZf7K+iyNh7EYTsqWBdZuFYRaLdKb1hqTw5xdOvmU118a0R5JIAlFAoqf X-Received: by 2002:a17:907:cb83:b0:7ad:f43a:cb0a with SMTP id un3-20020a170907cb8300b007adf43acb0amr2493140ejc.560.1668699529961; Thu, 17 Nov 2022 07:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668699529; cv=none; d=google.com; s=arc-20160816; b=DesKA13Z2+E2xtqZS3kS0u+qyceQ21LPeILUE/6hoduI0O475Rw7b7mB8z6cQFyGYc sZaBoYC1Ik6t/zCEsx0L+9wmisF41yC8U1O6YxZN9XSRm340GzF5eAdU+1B0k4PBthek TQi6zh6LsAK4UszLxRPvOrPJAluAyaAGxcr37a6tOejAJZhr+am7Vtwk8N1TriBrFAvU 5Yf04divvh/RsQoELpfio3FgFs1EQnYUMHmfTizUjslI5L3qri+Qbex2OveN2cisA12S T/1NJK53mcs/eZ8BrKr3OUYNnzbnjYH4rjNcMlR7tnXo9HWnJw2GrAyWyzBjhbVR9ZKf Om+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=8NoBHGkWfo/FAwwA1VPvEjKp+PExvO/PIrZbGPk96QM=; b=gvyAGzlGehfehjJB1FmsR8MdUAmBtdv3zlOhayRlM5HnooWvhxpd7AeB/3pSv2YML5 Bh8lBe9xZYmZ/61B5WQr+ufzBGSKsGutFaunS1c9+1qFLUCuwon7aXS24MqXgX54PtNY RFmjoekft8DAATXnbQVYTDYGzyzlgBq01SPyQqa6opJQLpSjsZfN+RSqYGfAxKsiZqr9 M1iwnbJK7Iwiwii7VbB1IlI/8G1Z9/WyqEdFFj93lkXjbTbTdY8f5KZcOIbvdnectdKu a/JDFVjh3t6E064cfXbh5HUE/rjh2FmTPcjDvOGLLpSLq/Pi0NItR/lLoxuGqh1JzmUd t5vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Xkkut7jI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga4-20020a1709070c0400b007ade20fc40csi989218ejc.810.2022.11.17.07.38.24; Thu, 17 Nov 2022 07:38:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Xkkut7jI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240275AbiKQPMJ (ORCPT + 92 others); Thu, 17 Nov 2022 10:12:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240407AbiKQPKT (ORCPT ); Thu, 17 Nov 2022 10:10:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F306549B56; Thu, 17 Nov 2022 07:08:37 -0800 (PST) Date: Thu, 17 Nov 2022 15:08:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668697716; 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=8NoBHGkWfo/FAwwA1VPvEjKp+PExvO/PIrZbGPk96QM=; b=Xkkut7jIcurxZkxhCtM168I2wzp7LP7cvXCI+Aoi3jVpF89bqrpFhScqRG2aOFl0snFn3v 52HZiQROr9zZDvAXgmMfJ6ppfYPpnkKguGlzM4P2ny5cTB+LYxoQx3qiALrLM7282heX22 BYAiZifns98GNzdYIfXU7IQom/5vlvL4BIpnraGJ7yBEHjbCG4b0cvM+DRmFq9VbvnumJq DKqfJC9tdj3MeHECzR340akLN7q18hG8Tf2Vp4BHX0Wcc8TUUNd4a9EXz3g8xhgECuO0jq AAk3OJYX5XQ5jbJKQiTREiah5ua9QthcxBvl1cMzdIBYUyFFId6OWC0lsVchuQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668697716; 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=8NoBHGkWfo/FAwwA1VPvEjKp+PExvO/PIrZbGPk96QM=; b=HtvDgFJ7ASw0Jv+lPq1T/QZIpwfnjvKr6uDnwQPfqMGLDeSCkR/NIYlwxaHeKNpTmofOjq yfWBEWuZdTQx7oCg== 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: irq/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, maz@kernel.org In-Reply-To: <87fsemtut0.ffs@tglx> References: <87fsemtut0.ffs@tglx> MIME-Version: 1.0 Message-ID: <166869771502.4906.2990569045387640705.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: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: e5dfd093eca01a5d8d967f959a2372d7d82eb59c Gitweb: https://git.kernel.org/tip/e5dfd093eca01a5d8d967f959a2372d7d82eb59c Author: Thomas Gleixner AuthorDate: Sun, 13 Nov 2022 22:21:15 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 17 Nov 2022 13:58:32 +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/hyperv_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/mshyperv.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); -#define hv_get_raw_timer() rdtsc_ordered() - void hyperv_vector_handler(struct pt_regs *regs); #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" struct vmbus_dynid { diff --git a/include/clocksource/hyperv_timer.h b/include/clocksource/hyperv_timer.h index b3f5d73..b4a3935 100644 --- a/include/clocksource/hyperv_timer.h +++ b/include/clocksource/hyperv_timer.h @@ -15,13 +15,15 @@ #include #include -#include +#include #define HV_MAX_MAX_DELTA_TICKS 0xffffffff #define HV_MIN_DELTA_TICKS 1 #ifdef CONFIG_HYPERV_TIMER +#include + /* Routines called by the VMbus driver */ extern int hv_stimer_alloc(bool have_percpu_irqs); extern int hv_stimer_cleanup(unsigned int cpu);