[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230818011256.211078-1-peter.hilber@opensynergy.com>
Date: Fri, 18 Aug 2023 03:12:51 +0200
From: Peter Hilber <peter.hilber@...nsynergy.com>
To: linux-kernel@...r.kernel.org,
kvm@...r.kernel.org,
kvmarm@...ts.linux.dev
Cc: Peter Hilber <peter.hilber@...nsynergy.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>,
John Stultz <jstultz@...gle.com>,
netdev@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Stephen Boyd <sboyd@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
x86@...nel.org,
Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Sean Christopherson <seanjc@...gle.com>
Subject: [RFC PATCH 0/4] treewide: Use clocksource id for get_device_system_crosststamp()
This patch series changes struct system_counterval_t to identify the
clocksource through enum clocksource_ids, rather than through struct
clocksource *. The net effect of the patch series is that
get_device_system_crosststamp() callers can supply clocksource ids instead
of clocksource pointers, which can be problematic to get hold of.
For this, modify some code which is relevant to
get_device_system_crosststamp(), in timekeeping, ptp/kvm, x86/kvm, and
x86/tsc.
The series does the following: First, introduce clocksource ids for x86 TSC
and kvm-clock. Then, refactor the x86 TSC a tiny bit to keep changes in the
last, "treewide" patch to a minimum. In the treewide patch, replace
system_counterval_t.cs by .cs_id.
This series should not alter any behavior. Out of the existing
get_device_system_crosststamp() users, only ptp_kvm has been tested (on
x86-64 and arm64). This series is a prerequisite for the virtio_rtc driver
(RFC v2 to be posted). Through this series, virtio_rtc can work without
modifying arm_arch_timer.
Peter Hilber (4):
x86/tsc: Add clocksource ids for TSC and early TSC
x86/kvm: Add clocksource id for kvm-clock
x86/tsc: Use bool, not pointer, for ART availability
treewide: Use clocksource id for struct system_counterval_t
arch/x86/kernel/kvmclock.c | 2 ++
arch/x86/kernel/tsc.c | 23 +++++++++++++++--------
drivers/ptp/ptp_kvm_common.c | 3 ++-
include/linux/clocksource_ids.h | 3 +++
include/linux/timekeeping.h | 4 ++--
kernel/time/timekeeping.c | 3 ++-
6 files changed, 26 insertions(+), 12 deletions(-)
base-commit: 47762f08697484cf0c2f2904b8c52375ed26c8cb
--
2.39.2
Powered by blists - more mailing lists