mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[Blackfin] arch: actually implement get_cycles function
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
parent
8cab0288c6
commit
764cb81cdc
2 changed files with 13 additions and 9 deletions
|
|
@ -1,18 +1,23 @@
|
|||
/* blackfin architecture timex specifications: Lineo Inc. 2001
|
||||
/*
|
||||
* asm-blackfin/timex.h: cpu cycles!
|
||||
*
|
||||
* Based on: include/asm-m68knommu/timex.h
|
||||
* Copyright 2004-2008 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
||||
#ifndef _ASMBLACKFIN_TIMEX_H
|
||||
#define _ASMBLACKFIN_TIMEX_H
|
||||
#ifndef _ASM_BLACKFIN_TIMEX_H
|
||||
#define _ASM_BLACKFIN_TIMEX_H
|
||||
|
||||
#define CLOCK_TICK_RATE 1000000 /* Underlying HZ */
|
||||
|
||||
typedef unsigned long cycles_t;
|
||||
typedef unsigned long long cycles_t;
|
||||
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
return 0;
|
||||
unsigned long tmp, tmp2;
|
||||
__asm__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2));
|
||||
return tmp | ((cycles_t)tmp2 << 32);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue