timex.h 463 字节
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
2 3 4 5 6
#ifndef _ASM_POWERPC_TIMEX_H
#define _ASM_POWERPC_TIMEX_H

#ifdef __KERNEL__

L
Linus Torvalds 已提交
7
/*
8
 * PowerPC architecture timex specifications
L
Linus Torvalds 已提交
9 10 11
 */

#include <asm/cputable.h>
12
#include <asm/vdso/timebase.h>
L
Linus Torvalds 已提交
13

14
#define CLOCK_TICK_RATE	1024000 /* Underlying HZ */
L
Linus Torvalds 已提交
15 16 17 18 19

typedef unsigned long cycles_t;

static inline cycles_t get_cycles(void)
{
20
	return mftb();
L
Linus Torvalds 已提交
21
}
22
#define get_cycles get_cycles
L
Linus Torvalds 已提交
23

24 25
#endif	/* __KERNEL__ */
#endif	/* _ASM_POWERPC_TIMEX_H */