[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0dc761fe-3d98-8c80-8ee3-01804843e8f9@intel.com>
Date: Wed, 31 Aug 2022 14:28:02 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Fei Li <fei1.li@...el.com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Cc: gregkh@...uxfoundation.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
yu1.wang@...el.com, conghui.chen@...el.com
Subject: Re: [PATCH] x86/acrn: Set up timekeeping
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.
Powered by blists - more mailing lists