Netdev List
 help / color / mirror / Atom feed
From: Peter Hilber <peter.hilber@opensynergy.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	kvmarm@lists.linux.dev
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Richard Cochran <richardcochran@gmail.com>,
	John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>,
	netdev@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Sean Christopherson <seanjc@google.com>
Subject: Re: [RFC PATCH 4/4] treewide: Use clocksource id for struct system_counterval_t
Date: Fri, 15 Sep 2023 16:29:26 +0200	[thread overview]
Message-ID: <2d86145b-4b70-5f3b-cf54-a6994ce24783@opensynergy.com> (raw)
In-Reply-To: <87cyyj1s40.ffs@tglx>

On 15.09.23 15:30, Thomas Gleixner wrote:
> 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

OK. For 2-4, I assume split x86/tsc, x86/kvm, drivers/ptp (which
also handles the CSID_ARM_ARCH_COUNTER case).

>> --- 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.

I will change the comment to refer to "Clocksource ID".

Thanks for the advice!

Peter

  reply	other threads:[~2023-09-15 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  1:12 [RFC PATCH 0/4] treewide: Use clocksource id for get_device_system_crosststamp() Peter Hilber
2023-08-18  1:12 ` [RFC PATCH 2/4] x86/kvm: Add clocksource id for kvm-clock Peter Hilber
2023-08-18  1:12 ` [RFC PATCH 4/4] treewide: Use clocksource id for struct system_counterval_t Peter Hilber
2023-09-15 13:30   ` Thomas Gleixner
2023-09-15 14:29     ` Peter Hilber [this message]
2023-08-25  4:18 ` [RFC PATCH 0/4] treewide: Use clocksource id for get_device_system_crosststamp() John Stultz
2023-09-13  9:10   ` Peter Hilber

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=2d86145b-4b70-5f3b-cf54-a6994ce24783@opensynergy.com \
    --to=peter.hilber@opensynergy.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=jstultz@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yuzenghui@huawei.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