[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] xen: move XEN_SYSCTL_physinfo, XEN_SYSCTL_numainfo and XEN_SYSCTL_topologyinfo to common code



On Mon, 2013-01-14 at 17:04 +0000, Stefano Stabellini wrote:
> diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
> index 9515b42..bcd7769 100644
> --- a/xen/arch/arm/time.c
> +++ b/xen/arch/arm/time.c
> @@ -41,16 +41,16 @@ uint64_t __read_mostly boot_count;
> 
>  /* For fine-grained timekeeping, we use the ARM "Generic Timer", a
>   * register-mapped time source in the SoC. */
> -static uint32_t __read_mostly cntfrq;      /* Ticks per second */
> +unsigned long __read_mostly cpu_khz;  /* CPU clock frequency in kHz.
> */
> 
>  /*static inline*/ s_time_t ticks_to_ns(uint64_t ticks)
>  {
> -    return muldiv64(ticks, SECONDS(1), cntfrq);
> +    return muldiv64(ticks, SECONDS(1), cpu_khz);
>  }

cntfrq and cpu_khz appear to have different units, so is this really
correct? (or else the existing comment on cntfrq is wrong, it implies
that the units are HZ).


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.