mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
In preparation for supporting tracing from the nVHE hyp, add support to generate timestamps with a clock fed by the CNTCVT counter. The clock can be kept in sync with the kernel's by updating the slope values. This will be done later. As current we do only create a trace clock, make the whole support dependent on the upcoming CONFIG_NVHE_EL2_TRACING. Signed-off-by: Vincent Donnefort <vdonnefort@google.com> Link: https://patch.msgid.link/20260309162516.2623589-21-vdonnefort@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
17 lines
456 B
C
17 lines
456 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ARM64_KVM_HYP_NVHE_CLOCK_H
|
|
#define __ARM64_KVM_HYP_NVHE_CLOCK_H
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/kvm_hyp.h>
|
|
|
|
#ifdef CONFIG_NVHE_EL2_TRACING
|
|
void trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc);
|
|
u64 trace_clock(void);
|
|
#else
|
|
static inline void
|
|
trace_clock_update(u32 mult, u32 shift, u64 epoch_ns, u64 epoch_cyc) { }
|
|
static inline u64 trace_clock(void) { return 0; }
|
|
#endif
|
|
#endif
|