From: Dave Hansen <dave.hansen@intel.com>
To: Fei Li <fei1.li@intel.com>, linux-kernel@vger.kernel.org, x86@kernel.org
Cc: gregkh@linuxfoundation.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
yu1.wang@intel.com, conghui.chen@intel.com
Subject: Re: [PATCH] x86/acrn: Set up timekeeping
Date: Wed, 31 Aug 2022 14:28:02 -0700 [thread overview]
Message-ID: <0dc761fe-3d98-8c80-8ee3-01804843e8f9@intel.com> (raw)
In-Reply-To: <20220804055903.365211-1-fei1.li@intel.com>
On 8/3/22 22:59, Fei Li wrote:
> +static inline unsigned long acrn_get_tsc_khz(void)
> +{
> + return cpuid_eax(ACRN_CPUID_TIMING_INFO);
> +}
> +
> /*
> * Hypercalls for ACRN
> *
> diff --git a/arch/x86/kernel/cpu/acrn.c b/arch/x86/kernel/cpu/acrn.c
> index 23f5f27b5a02..485441b7f030 100644
> --- a/arch/x86/kernel/cpu/acrn.c
> +++ b/arch/x86/kernel/cpu/acrn.c
> @@ -28,6 +28,9 @@ static void __init acrn_init_platform(void)
> {
> /* Setup the IDT for ACRN hypervisor callback */
> alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, asm_sysvec_acrn_hv_callback);
> +
> + x86_platform.calibrate_tsc = acrn_get_tsc_khz;
> + x86_platform.calibrate_cpu = acrn_get_tsc_khz;
> }
Could you take a sec and consider what 'static inline' does and means
and also what setting:
x86_platform.calibrate_cpu = acrn_get_tsc_khz;
does?
Using 'static inline' might compile, but it doesn't make sense.
next prev parent reply other threads:[~2022-08-31 21:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 5:59 Fei Li
2022-08-04 9:52 ` [tip: x86/platform] " tip-bot2 for Fei Li
2022-08-31 21:28 ` Dave Hansen [this message]
2022-09-01 7:02 ` [PATCH] " Li, Fei1
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=0dc761fe-3d98-8c80-8ee3-01804843e8f9@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=conghui.chen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=fei1.li@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu1.wang@intel.com \
/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
all inboxes | Powered by JetHome®