kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: netdev@vger.kernel.org, yangbo.lu@nxp.com,
	john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com,
	seanjc@google.com, richardcochran@gmail.com,
	Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com,
	Andre.Przywara@arm.com, steven.price@arm.com,
	lorenzo.pieralisi@arm.com, sudeep.holla@arm.com
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	Steve.Capper@arm.com, justin.he@arm.com, jianyong.wu@arm.com,
	kernel-team@android.com, Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH v18 5/7] clocksource: Add clocksource id for arm arch counter
Date: Mon,  8 Feb 2021 13:40:27 +0000	[thread overview]
Message-ID: <20210208134029.3269384-6-maz@kernel.org> (raw)
In-Reply-To: <20210208134029.3269384-1-maz@kernel.org>

From: Jianyong Wu <jianyong.wu@arm.com>

Add clocksource id to the ARM generic counter so that it can be easily
identified from callers such as ptp_kvm.

Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201209060932.212364-6-jianyong.wu@arm.com
---
 drivers/clocksource/arm_arch_timer.c | 2 ++
 include/linux/clocksource_ids.h      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index d0177824c518..8f12e223703f 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -16,6 +16,7 @@
 #include <linux/cpu_pm.h>
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
+#include <linux/clocksource_ids.h>
 #include <linux/interrupt.h>
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
@@ -191,6 +192,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc)
 
 static struct clocksource clocksource_counter = {
 	.name	= "arch_sys_counter",
+	.id	= CSID_ARM_ARCH_COUNTER,
 	.rating	= 400,
 	.read	= arch_counter_read,
 	.mask	= CLOCKSOURCE_MASK(56),
diff --git a/include/linux/clocksource_ids.h b/include/linux/clocksource_ids.h
index 4d8e19e05328..16775d7d8f8d 100644
--- a/include/linux/clocksource_ids.h
+++ b/include/linux/clocksource_ids.h
@@ -5,6 +5,7 @@
 /* Enum to give clocksources a unique identifier */
 enum clocksource_ids {
 	CSID_GENERIC		= 0,
+	CSID_ARM_ARCH_COUNTER,
 	CSID_MAX,
 };
 
-- 
2.29.2


  parent reply	other threads:[~2021-02-08 13:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 13:40 [PATCH v18 0/7] KVM: arm64: Add host/guest KVM-PTP support Marc Zyngier
2021-02-08 13:40 ` [PATCH v18 1/7] arm/arm64: Probe for the presence of KVM hypervisor Marc Zyngier
2021-02-10 16:07   ` Steven Price
2021-02-08 13:40 ` [PATCH v18 2/7] KVM: arm64: Advertise KVM UID to guests via SMCCC Marc Zyngier
2021-02-08 13:40 ` [PATCH v18 3/7] ptp: Reorganize ptp_kvm.c to make it arch-independent Marc Zyngier
2021-02-10 16:19   ` Andre Przywara
2021-02-08 13:40 ` [PATCH v18 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot Marc Zyngier
2021-02-08 13:40 ` Marc Zyngier [this message]
2021-02-10 16:22   ` [PATCH v18 5/7] clocksource: Add clocksource id for arm arch counter Andre Przywara
2021-02-08 13:40 ` [PATCH v18 6/7] KVM: arm64: Add support for the KVM PTP service Marc Zyngier
2021-03-30  9:58   ` Jianyong Wu
2021-02-08 13:40 ` [PATCH v18 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 Marc Zyngier
2021-03-30 10:05   ` 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=20210208134029.3269384-6-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=Andre.Przywara@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=kernel-team@android.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=lorenzo.pieralisi@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=seanjc@google.com \
    --cc=steven.price@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).