mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
For historic reasons there are some TSC-related functions in the
<asm/msr.h> header, even though there's an <asm/tsc.h> header.
To facilitate the relocation of rdtsc{,_ordered}() from <asm/msr.h>
to <asm/tsc.h> and to eventually eliminate the inclusion of
<asm/msr.h> in <asm/tsc.h>, add an explicit <asm/msr.h> dependency
to the source files that reference definitions from <asm/msr.h>.
[ mingo: Clarified the changelog. ]
Signed-off-by: Xin Li (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Dave Hansen <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Ilpo Järvinen <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Uros Bizjak <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
18 lines
338 B
C
18 lines
338 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* X86 trace clocks
|
|
*/
|
|
#include <asm/trace_clock.h>
|
|
#include <asm/barrier.h>
|
|
#include <asm/tsc.h>
|
|
|
|
/*
|
|
* trace_clock_x86_tsc(): A clock that is just the cycle counter.
|
|
*
|
|
* Unlike the other clocks, this is not in nanoseconds.
|
|
*/
|
|
u64 notrace trace_clock_x86_tsc(void)
|
|
{
|
|
return rdtsc_ordered();
|
|
}
|