linux-stable/arch/powerpc/include/asm/timex.h
Christophe Leroy d26b3817d9 powerpc/time: Move timebase functions into new asm/vdso/timebase.h
In order to easily use get_tb() from C VDSO, move timebase
functions into a new header named asm/vdso/timebase.h

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201126131006.2431205-3-mpe@ellerman.id.au
2020-12-04 01:01:10 +11:00

24 lines
433 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_TIMEX_H
#define _ASM_POWERPC_TIMEX_H
#ifdef __KERNEL__
/*
* PowerPC architecture timex specifications
*/
#include <asm/cputable.h>
#include <asm/vdso/timebase.h>
#define CLOCK_TICK_RATE 1024000 /* Underlying HZ */
typedef unsigned long cycles_t;
static inline cycles_t get_cycles(void)
{
return mftb();
}
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_TIMEX_H */