From 197165d44925bd0fa892990851dee4d312a44b39 Mon Sep 17 00:00:00 2001 From: "Naveen N. Rao" Date: Fri, 24 Apr 2015 14:24:44 +0530 Subject: powerpc/ftrace: add powerpc timebase as a trace clock source Add a new powerpc-specific trace clock using the timebase register, similar to x86-tsc. This gives us - a fast, monotonic, hardware clock source for trace entries, and - a clock that can be used to correlate events across cpus as well as across hypervisor and guests. Signed-off-by: Naveen N. Rao Acked-by: Steven Rostedt Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/trace_clock.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 arch/powerpc/include/asm/trace_clock.h (limited to 'arch/powerpc/include/asm/trace_clock.h') diff --git a/arch/powerpc/include/asm/trace_clock.h b/arch/powerpc/include/asm/trace_clock.h new file mode 100644 index 0000000..cf1ee75 --- /dev/null +++ b/arch/powerpc/include/asm/trace_clock.h @@ -0,0 +1,19 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, as + * published by the Free Software Foundation. + * + * Copyright (C) 2015 Naveen N. Rao, IBM Corporation + */ + +#ifndef _ASM_PPC_TRACE_CLOCK_H +#define _ASM_PPC_TRACE_CLOCK_H + +#include +#include + +extern u64 notrace trace_clock_ppc_tb(void); + +#define ARCH_TRACE_CLOCKS { trace_clock_ppc_tb, "ppc-tb", 0 }, + +#endif /* _ASM_PPC_TRACE_CLOCK_H */ -- cgit v1.1