Re: [RFC PATCH 4/4] treewide: Use clocksource id for struct system_counterval_t

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

 



Peter!

On Fri, Aug 18 2023 at 03:12, Peter Hilber wrote:
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -1313,7 +1313,7 @@ struct system_counterval_t convert_art_to_tsc(u64 art)
>  	res += tmp + art_to_tsc_offset;
>  
>  	return (struct system_counterval_t) {
> -		.cs = have_art ? &clocksource_tsc : NULL,
> +		.cs_id = have_art ? CSID_TSC : CSID_GENERIC,
>  		.cycles = res

Can you please change all of this so that:

    patch 1:   Adds cs_id to struct system_counterval_t
    patch 2-4: Add the clocksource ID and set the cs_id field
    patch 5:   Switches the core to evaluate cs_id
    patch 6:   Remove the cs field from system_counterval_t


> --- a/include/linux/timekeeping.h
> +++ b/include/linux/timekeeping.h
> @@ -270,12 +270,12 @@ struct system_device_crosststamp {
>   * struct system_counterval_t - system counter value with the pointer to the
>   *				corresponding clocksource
>   * @cycles:	System counter value
> - * @cs:		Clocksource corresponding to system counter value. Used by
> + * @cs_id:	Clocksource corresponding to system counter value. Used by
>   *		timekeeping code to verify comparibility of two cycle values

That comment is inaccurate. It's not longer the clocksource itself. It's
the ID which is used for validation.

Thanks,

        tglx



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux