blob: b8e7abe00b065e08a3982dad5e19eef70f2a191d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
David Sharp8cbd9cc2012-11-13 12:18:21 -08002/*
3 * X86 trace clocks
4 */
5#include <asm/trace_clock.h>
6#include <asm/barrier.h>
7#include <asm/msr.h>
8
9/*
10 * trace_clock_x86_tsc(): A clock that is just the cycle counter.
11 *
12 * Unlike the other clocks, this is not in nanoseconds.
13 */
14u64 notrace trace_clock_x86_tsc(void)
15{
Andy Lutomirski03b97302015-06-25 18:44:08 +020016 return rdtsc_ordered();
David Sharp8cbd9cc2012-11-13 12:18:21 -080017}