Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1858258rwb; Thu, 17 Nov 2022 03:09:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf4NLiguq8Oj14VaN21UY2E9Dynkh3ay0DbrWUCOscAYzVTmxEGawVPzI+QC6gF08DYMPTQJ X-Received: by 2002:a17:902:c3d1:b0:186:5cda:1e01 with SMTP id j17-20020a170902c3d100b001865cda1e01mr2254854plj.111.1668683348855; Thu, 17 Nov 2022 03:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668683348; cv=none; d=google.com; s=arc-20160816; b=I26M0SqRx/Gy0RhY9jfyAeep9umI1HTZnLq83BG47dHcN1XKiBFRc06EigxtcijIzT GpgJ1y8/ANQdvYcCQMEEYuLAPKIICHcVkXS2q7X5gGbOmtMsLmayqVeDrxBt5wgIWH92 Gzo0gFnyYEDyAYtgodcR3sHvgFRfKYwQ8eLtLUt/YUp2Z7o/NUPWe0JvUClKZ8vzS2D3 bOGwUTj+zpofon8oQFPJiIr1mp6NIFe7D95EHbsaQw9d98SzukYIJpvSduiTghx219oR 5ORDTQ/8E9iwDdBOxhqd8/JPq2t3gXAqK+Zspoug1804BvgYVC4ZqahSj7VW1nkqXavC 25uw== 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=NGMrXryM4O7/O3wJE9j6fSOZ5sPkDqtPXocsCfQsU8Y=; b=cBn1q71zVduiaa1jWtw36sBxmrI9jS0KQtovM9BN7/F370e667RyuCGtFBOD0eMsZR Eg0hmeGOBEOVyrzdgDXUdBjdudv9PPYqY5CZTuAnJs1xemQhGsSpjv87iPNzs5Y8gbqo YSuPn2wOjKeVPrjF9gGxfOHwtAuzfgTTEGDTM+VniQI0N8fEMILc2JEpuCklm1OXmMxR yQ64bKXMVtd/Akdprq1UNrsj6ShkIqUxR1qFick4ZD5xBI+nZWDekj8Q6IRktwY097x+ IDujh8DwwrtvmmS2R1BnaLTkRPIdmMgbU2ohn0d4Bv1irpt3HYJc5E3Zn3MUG4oWRoj8 0BYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=elTeZQPN; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+UeVv0dg; 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 b188-20020a6367c5000000b00476990d057asi701428pgc.472.2022.11.17.03.08.57; Thu, 17 Nov 2022 03:09:08 -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=elTeZQPN; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+UeVv0dg; 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 S238882AbiKQKsv (ORCPT + 91 others); Thu, 17 Nov 2022 05:48:51 -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: 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 timers/core branch of tip: Commit-ID: d3fe5c2f206148f86f85f56671109a3118bf0d2b Gitweb: https://git.kernel.org/tip/d3fe5c2f206148f86f85f56671109a3118bf0d2b 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/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);