Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1188913rwb; Wed, 16 Nov 2022 13:31:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf4VZ8B0xb2Z1QqwYO56hgSe7nUErIzoGLBqwCbWpO4Aa2KvEvVVXOouQvEMs4yzHeelMNBd X-Received: by 2002:a17:907:210d:b0:7ae:25ba:5e4b with SMTP id qn13-20020a170907210d00b007ae25ba5e4bmr19509660ejb.724.1668634310873; Wed, 16 Nov 2022 13:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668634310; cv=none; d=google.com; s=arc-20160816; b=RzpJ+NDb5zZSNgfzgOs7O+LZbuaq3/kLC45r4/tXAfVcyttSQ/XF9qzNWUvvzScYZf 8rqxJH8pI4TwG+zFWCpj+tQQyy8PbrxX59LXvb1BKBsdGj96/3aIbsAd/90d68Wlxpml /S4S04qYTwOD9/MsrzODQHDjFm/XEld4a8egJtI9jJo3Tr3+GGOi8QGJayCBkyZMzxZu etuAWpqwHQY9ikwvRhws9c9v0WJ2jkiZ4GFpvVEEcUlaTxND1/j29Fit+gURVtQeuugC r4wkafa91QBRuzcLwCBNj7Me+91h7bMsztQ25Ad7SsRiHpPFw9yyQvTCWXIqxh9miv3z 3Y0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=33J5BD3tpOzz0XsMXF5A2OumpToZnyzGEePA9xQwZn0=; b=JKpFWTsWG2IszByG+IYckpsoTdGU+ZF4i/qlHuYYKsNry1rB9MeUHZa6skdsmvXsqU zTeKqdXgKbjKWYWyDyApSrk/ORaOu8hTTYepA/4NJaVSRI7wYuaadK3Svoj+w+ws7602 pSIIsa3rQWbTXmHHVI7rpBsT/qIrhOvuUpFmjykt6xqhhaMZeXECFvI5MAwXHt8h/ZlF 08dncOIxxVhjsYxvy+cZXQhgvLrpy0uABjs/mAV4OnVW1jS2y3AG1+M6tXH+aBnok88Z FO4BE64c7V3UEVP2bxuIariQR+MPMW/ns3ly9aHbZelsowZueJkQm83qt2H+1PkScLrk f+gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EpyHVR7g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="bQ/iiX/x"; 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 rv14-20020a17090710ce00b0077d854aa10dsi11641487ejb.57.2022.11.16.13.31.28; Wed, 16 Nov 2022 13:31:50 -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=EpyHVR7g; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="bQ/iiX/x"; 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 S234630AbiKPUxA (ORCPT + 90 others); Wed, 16 Nov 2022 15:53:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234275AbiKPUwa (ORCPT ); Wed, 16 Nov 2022 15:52:30 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD0963B9D; Wed, 16 Nov 2022 12:52:29 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668631947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=33J5BD3tpOzz0XsMXF5A2OumpToZnyzGEePA9xQwZn0=; b=EpyHVR7gyrCyXJL9CcGKJOYB/RjC+W7AlH8xKC/vcZ5wVNqtlBANLmpDqMo0ZtjIGnmWLY pTd9r9HxGoOT/EEwE5Ybgaeg8bJRfal78kY+2GhEJjtPzbdRLZTbiFOYuIz+nBczEUcvzs vcvwqwSs7UK0SiG1oo2q4/f79jAa94nTQxXBVJMQR+hgrU9ouX5de4MIpPVMqKRuyrtfnk /Jtf/dDxJW3HbGYwg/bw3P8/pcPa15unfLj0S2PbwpiSpn+s1o7HGWMu9bJqcb7HgO1pB0 ZJXwk9iB2jQbgHfWHcE0WbTz+GuNFSbyE5yW2287jMulsr1Ry1BD14f3A24+sw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668631947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=33J5BD3tpOzz0XsMXF5A2OumpToZnyzGEePA9xQwZn0=; b=bQ/iiX/xd+FgZdfYSqeEeN1dFeG+IhxZkOFIV4csii4NpB/tP5VT53rLO4YKXZO4pPwy0v cLDBgbpcfIAJVuAA== To: "Michael Kelley (LINUX)" , LKML Cc: "linux-hyperv@vger.kernel.org" , Haiyang Zhang , Wei Liu , Dexuan Cui , Andy Lutomirski , Vincenzo Frascino , Daniel Lezcano Subject: RE: [PATCH] clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h In-Reply-To: <87fsemtut0.ffs@tglx> References: <87zgcwt2qg.ffs@tglx> <87wn7ztc89.ffs@tglx> <87sfinta8q.ffs@tglx> <87leoft9w1.ffs@tglx> <87fsemtut0.ffs@tglx> Date: Wed, 16 Nov 2022 21:52:26 +0100 Message-ID: <8735aipqph.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 Michael! On Sun, Nov 13 2022 at 22:21, Thomas Gleixner wrote: > Subject: clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h > From: Thomas Gleixner > Date: Sat, 12 Nov 2022 19:08:15 +0100 > > 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 and move the hv_get_raw_timer() define into the header file. > > Fixup drivers/hv/vmbus_drv.c which relies on the indirect include of > asm/mshyperv.h. Any comments on this latest version? > Signed-off-by: Thomas Gleixner > --- > 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(-) > > --- /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 > --- a/arch/x86/include/asm/mshyperv.h > +++ b/arch/x86/include/asm/mshyperv.h > @@ -19,8 +19,6 @@ typedef int (*hyperv_fill_flush_list_fun > 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) > --- 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 { > --- 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);