All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jianyong Wu <jianyong.wu@arm.com>
Cc: netdev@vger.kernel.org, yangbo.lu@nxp.com,
	john.stultz@linaro.org, pbonzini@redhat.com,
	sean.j.christopherson@intel.com, maz@kernel.org,
	richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org,
	suzuki.poulose@arm.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com,
	nd@arm.com
Subject: Re: [RFC PATCH v7 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot
Date: Thu, 14 Nov 2019 15:19:01 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911141507010.2507@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20191114121358.6684-5-jianyong.wu@arm.com>

On Thu, 14 Nov 2019, Jianyong Wu wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
> In some scenario like return device time to ptp_kvm guest,
> we need identify the current clocksource outside core time code.
> A mechanism added to recognize the current clocksource
> by export clocksource id in time_get_snapshot.

Can you please replace that with the following:

 System time snapshots are not conveying information about the current
 clocksource which was used, but callers like the PTP KVM guest
 implementation have the requirement to evaluate the clocksource type to
 select the appropriate mechanism.

 Introduce a clocksource id field in struct clocksource which is by default
 set to CSID_GENERIC (0). Clocksource implementations can set that field to
 a value which allows to identify the clocksource.

 Store the clocksource id of the current clocksource in the
 system_time_snapshot so callers can evaluate which clocksource was used to
 take the snapshot and act accordingly.

> diff --git a/include/linux/clocksource_ids.h b/include/linux/clocksource_ids.h
> new file mode 100644
> index 000000000000..93bec8426c44
> --- /dev/null
> +++ b/include/linux/clocksource_ids.h
> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_CLOCKSOURCE_IDS_H
> +#define _LINUX_CLOCKSOURCE_IDS_H
> +
> +/* Enum to give clocksources a unique identifier */
> +enum clocksource_ids {
> +	CSID_GENERIC		= 0,
> +	CSID_ARM_ARCH_COUNTER,

This should only add the infrastructure with just CSID_GENERIC in place.

The ARM_ARCH variant needs to come in a seperate patch which adds the enum
and uses it in the corresponding driver. Seperate means a patch doing only
that and nothing else, i.e. not hidden in some other patch which actually
makes use of it.

Thanks,

	tglx

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Jianyong Wu <jianyong.wu@arm.com>
Cc: justin.he@arm.com, kvm@vger.kernel.org, maz@kernel.org,
	richardcochran@gmail.com, yangbo.lu@nxp.com,
	linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com,
	john.stultz@linaro.org, netdev@vger.kernel.org,
	pbonzini@redhat.com, nd@arm.com, will@kernel.org,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH v7 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot
Date: Thu, 14 Nov 2019 15:19:01 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911141507010.2507@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20191114121358.6684-5-jianyong.wu@arm.com>

On Thu, 14 Nov 2019, Jianyong Wu wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
> In some scenario like return device time to ptp_kvm guest,
> we need identify the current clocksource outside core time code.
> A mechanism added to recognize the current clocksource
> by export clocksource id in time_get_snapshot.

Can you please replace that with the following:

 System time snapshots are not conveying information about the current
 clocksource which was used, but callers like the PTP KVM guest
 implementation have the requirement to evaluate the clocksource type to
 select the appropriate mechanism.

 Introduce a clocksource id field in struct clocksource which is by default
 set to CSID_GENERIC (0). Clocksource implementations can set that field to
 a value which allows to identify the clocksource.

 Store the clocksource id of the current clocksource in the
 system_time_snapshot so callers can evaluate which clocksource was used to
 take the snapshot and act accordingly.

> diff --git a/include/linux/clocksource_ids.h b/include/linux/clocksource_ids.h
> new file mode 100644
> index 000000000000..93bec8426c44
> --- /dev/null
> +++ b/include/linux/clocksource_ids.h
> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_CLOCKSOURCE_IDS_H
> +#define _LINUX_CLOCKSOURCE_IDS_H
> +
> +/* Enum to give clocksources a unique identifier */
> +enum clocksource_ids {
> +	CSID_GENERIC		= 0,
> +	CSID_ARM_ARCH_COUNTER,

This should only add the infrastructure with just CSID_GENERIC in place.

The ARM_ARCH variant needs to come in a seperate patch which adds the enum
and uses it in the corresponding driver. Seperate means a patch doing only
that and nothing else, i.e. not hidden in some other patch which actually
makes use of it.

Thanks,

	tglx
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Jianyong Wu <jianyong.wu@arm.com>
Cc: Mark.Rutland@arm.com, justin.he@arm.com, kvm@vger.kernel.org,
	suzuki.poulose@arm.com, maz@kernel.org, richardcochran@gmail.com,
	yangbo.lu@nxp.com, linux-kernel@vger.kernel.org,
	sean.j.christopherson@intel.com, Kaly.Xin@arm.com,
	john.stultz@linaro.org, netdev@vger.kernel.org,
	pbonzini@redhat.com, nd@arm.com, will@kernel.org,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, Steve.Capper@arm.com
Subject: Re: [RFC PATCH v7 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot
Date: Thu, 14 Nov 2019 15:19:01 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911141507010.2507@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20191114121358.6684-5-jianyong.wu@arm.com>

On Thu, 14 Nov 2019, Jianyong Wu wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
> In some scenario like return device time to ptp_kvm guest,
> we need identify the current clocksource outside core time code.
> A mechanism added to recognize the current clocksource
> by export clocksource id in time_get_snapshot.

Can you please replace that with the following:

 System time snapshots are not conveying information about the current
 clocksource which was used, but callers like the PTP KVM guest
 implementation have the requirement to evaluate the clocksource type to
 select the appropriate mechanism.

 Introduce a clocksource id field in struct clocksource which is by default
 set to CSID_GENERIC (0). Clocksource implementations can set that field to
 a value which allows to identify the clocksource.

 Store the clocksource id of the current clocksource in the
 system_time_snapshot so callers can evaluate which clocksource was used to
 take the snapshot and act accordingly.

> diff --git a/include/linux/clocksource_ids.h b/include/linux/clocksource_ids.h
> new file mode 100644
> index 000000000000..93bec8426c44
> --- /dev/null
> +++ b/include/linux/clocksource_ids.h
> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_CLOCKSOURCE_IDS_H
> +#define _LINUX_CLOCKSOURCE_IDS_H
> +
> +/* Enum to give clocksources a unique identifier */
> +enum clocksource_ids {
> +	CSID_GENERIC		= 0,
> +	CSID_ARM_ARCH_COUNTER,

This should only add the infrastructure with just CSID_GENERIC in place.

The ARM_ARCH variant needs to come in a seperate patch which adds the enum
and uses it in the corresponding driver. Seperate means a patch doing only
that and nothing else, i.e. not hidden in some other patch which actually
makes use of it.

Thanks,

	tglx

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-11-14 14:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 12:13 [RFC PATCH v7 0/7] Enable ptp_kvm for arm64 Jianyong Wu
2019-11-14 12:13 ` Jianyong Wu
2019-11-14 12:13 ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 1/7] arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 2/7] psci: let arm_smccc_1_1_invoke available by modules Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 3/7] ptp: Reorganize ptp_kvm modules to make it arch-independent Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 14:19   ` Thomas Gleixner [this message]
2019-11-14 14:19     ` Thomas Gleixner
2019-11-14 14:19     ` Thomas Gleixner
2019-11-15  8:24     ` Jianyong Wu (Arm Technology China)
2019-11-15  8:24       ` Jianyong Wu (Arm Technology China)
2019-11-15  8:24       ` Jianyong Wu (Arm Technology China)
2019-11-14 12:13 ` [RFC PATCH v7 5/7] psci: Add hvc call service for ptp_kvm Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 6/7] ptp: arm64: Enable ptp_kvm for arm64 Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13 ` [RFC PATCH v7 7/7] kvm: arm64: Add capability check extension for ptp_kvm Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu
2019-11-14 12:13   ` Jianyong Wu

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=alpine.DEB.2.21.1911141507010.2507@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Kaly.Xin@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=jianyong.wu@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=justin.he@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=nd@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yangbo.lu@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.