xref: /linux/arch/arm64/include/asm/timex.h (revision 985c0679dfa459a1deed31b999b26e4420786874)
1*985c0679SMarc Zyngier /*
2*985c0679SMarc Zyngier  * Copyright (C) 2012 ARM Ltd.
3*985c0679SMarc Zyngier  *
4*985c0679SMarc Zyngier  * This program is free software; you can redistribute it and/or modify
5*985c0679SMarc Zyngier  * it under the terms of the GNU General Public License version 2 as
6*985c0679SMarc Zyngier  * published by the Free Software Foundation.
7*985c0679SMarc Zyngier  *
8*985c0679SMarc Zyngier  * This program is distributed in the hope that it will be useful,
9*985c0679SMarc Zyngier  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10*985c0679SMarc Zyngier  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11*985c0679SMarc Zyngier  * GNU General Public License for more details.
12*985c0679SMarc Zyngier  *
13*985c0679SMarc Zyngier  * You should have received a copy of the GNU General Public License
14*985c0679SMarc Zyngier  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15*985c0679SMarc Zyngier  */
16*985c0679SMarc Zyngier #ifndef __ASM_TIMEX_H
17*985c0679SMarc Zyngier #define __ASM_TIMEX_H
18*985c0679SMarc Zyngier 
19*985c0679SMarc Zyngier /*
20*985c0679SMarc Zyngier  * Use the current timer as a cycle counter since this is what we use for
21*985c0679SMarc Zyngier  * the delay loop.
22*985c0679SMarc Zyngier  */
23*985c0679SMarc Zyngier #define get_cycles()	({ cycles_t c; read_current_timer(&c); c; })
24*985c0679SMarc Zyngier 
25*985c0679SMarc Zyngier #include <asm-generic/timex.h>
26*985c0679SMarc Zyngier 
27*985c0679SMarc Zyngier #define ARCH_HAS_READ_CURRENT_TIMER
28*985c0679SMarc Zyngier 
29*985c0679SMarc Zyngier #endif
30