From patchwork Thu Nov 17 10:48:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 21551 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp331008wrr; Thu, 17 Nov 2022 02:54:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf6CGqrBW6fbvKbddyoa2kNGDWC71UqenNuNgByI4kgDMRbbnXaa8m7ZZltCClJEXZsKkp/5 X-Received: by 2002:a17:90a:b285:b0:216:ab1b:98d0 with SMTP id c5-20020a17090ab28500b00216ab1b98d0mr8239565pjr.67.1668682449624; Thu, 17 Nov 2022 02:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668682449; cv=none; d=google.com; s=arc-20160816; b=k69lziJdFKSk9LQ1k/NKBQQhkkzMizbqSYtkjGKZTpTlhaIYm5E32dAh9j0aCTTGYh g1VBqGiqZDq/luW/lpenZC00QNwAZ2XzJJyjnwdvbZoAqJT3hJcFLJ0aONA3xSew8Tkh L+6NvnfuxfQK2K7H4aE7Cb5PBaFGa7H+3s4O3GRYRqLwAbDANM07qs+r8X35a52q+fip HjF87y3deD7g5lUt+VdJiDoFKJga3l5QUYLNV46GfaL5cphzjRZO3mKeegyiZQfa+xZF O9xBgCvZAT4GQp6KE1mybE/qVrIluqIdHqmXxycp8aKsaAgG0ti4Cy4v5kDKszo9ebwg MI1Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f187-20020a636ac4000000b00476f92d5967si613729pgc.877.2022.11.17.02.53.56; Thu, 17 Nov 2022 02:54:09 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749318851125877705?= X-GMAIL-MSGID: =?utf-8?q?1749740368525804142?= 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);