lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] x86/acrn: Set up timekeeping
Date
> 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.
>
Hi Dave

Thanks for your reply.
Yes, 'inline' doesn't make sense here.
Now this commit has been merged into the x86/platform branch of tip,
I will send a patch to remove 'inline' once this commit has been merged
into the master branch.

Thanks again.
\
 
 \ /
  Last update: 2022-09-01 09:05    [W:0.058 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site