From: Thomas Gleixner <tglx@linutronix.de>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Andy Lutomirski <luto@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: RE: [PATCH] clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h
Date: Sun, 13 Nov 2022 22:19:46 +0100 [thread overview]
Message-ID: <87iljituvh.ffs@tglx> (raw)
In-Reply-To: <BYAPR21MB1688DCC2BDD263042B499D84D7029@BYAPR21MB1688.namprd21.prod.outlook.com>
On Sun, Nov 13 2022 at 13:12, Michael Kelley wrote:
> From: Thomas Gleixner <tglx@linutronix.de> Sent: Sunday, November 13, 2022 1:50 AM
>> On Sat, Nov 12 2022 at 21:55, Michael Kelley wrote:
>> > But I can see the problem with too much getting dragged into the VDSO
>> > builds. If hv_get_raw_timer() is added to hyperv_timer.h, it should
>> > be under #ifdef CONFIG_X86. Adding an #ifdef isn't ideal, and a more
>> > more proper solution might be to have a separate hyperv_timer.h include
>> > file under arch/x86/include/asm. But the latter seems like overkill for just
>> > hv_get_raw_timer(), so I'm OK with the #ifdef.
>>
>> We surely can have asm/hyperv_timer.h but TBH:
>>
>> >> static inline notrace u64
>> >> hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg, u64 *cur_tsc)
>> >> {
>>
>> hv_read_tsc_page_tsc() does not look architecture agnostic either. TSC
>> is pretty x86 specific :)
>
> Yes, the naming still says "tsc". But there's nothing in the code that actually
> requires the TSC if hv_get_raw_timer() maps to some other hardware counter on
> a different architecture. That's why the hv_get_raw_timer() abstraction is there
> in the first place. If we didn't care about x86-isms, hv_read_tsc_page_tsc() would
> just directly invoke rdtsc_ordered().
Not really intuitive, but anyway...
prev parent reply other threads:[~2022-11-13 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 19:03 [PATCH] clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h Thomas Gleixner
2022-11-12 21:55 ` Michael Kelley (LINUX)
2022-11-13 9:50 ` Thomas Gleixner
2022-11-13 10:33 ` Thomas Gleixner
2022-11-13 10:40 ` Thomas Gleixner
2022-11-13 21:21 ` Thomas Gleixner
2022-11-16 20:52 ` Thomas Gleixner
2022-11-16 22:34 ` Michael Kelley (LINUX)
2022-11-16 22:56 ` Thomas Gleixner
2022-11-17 10:48 ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
2022-11-17 15:08 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2022-11-13 13:12 ` [PATCH] " Michael Kelley (LINUX)
2022-11-13 21:19 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iljituvh.ffs@tglx \
--to=tglx@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mikelley@microsoft.com \
--cc=vincenzo.frascino@arm.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox