mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
arch: hexagon: kernel: add export symbol function __delay()
Need add __delay() implementation, or can not pass allmodconfig in next-20131118 tree. The related error: CC kernel/locking/spinlock_debug.o kernel/locking/spinlock_debug.c: In function '__spin_lock_debug': kernel/locking/spinlock_debug.c:114:3: error: implicit declaration of function '__delay' [-Werror=implicit-function-declaration] Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
This commit is contained in:
parent
d811d8cc54
commit
196b933d29
2 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include <asm/param.h>
|
#include <asm/param.h>
|
||||||
|
|
||||||
|
extern void __delay(unsigned long cycles);
|
||||||
extern void __udelay(unsigned long usecs);
|
extern void __udelay(unsigned long usecs);
|
||||||
|
|
||||||
#define udelay(usecs) __udelay((usecs))
|
#define udelay(usecs) __udelay((usecs))
|
||||||
|
|
|
@ -229,6 +229,15 @@ void __init time_init(void)
|
||||||
late_time_init = time_init_deferred;
|
late_time_init = time_init_deferred;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __delay(unsigned long cycles)
|
||||||
|
{
|
||||||
|
unsigned long long start = __vmgettime();
|
||||||
|
|
||||||
|
while ((__vmgettime() - start) < cycles)
|
||||||
|
cpu_relax();
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(__delay);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This could become parametric or perhaps even computed at run-time,
|
* This could become parametric or perhaps even computed at run-time,
|
||||||
* but for now we take the observed simulator jitter.
|
* but for now we take the observed simulator jitter.
|
||||||
|
|
Loading…
Reference in a new issue