diff options
author | Chen Gang <gang.chen.5i5j@gmail.com> | 2013-11-18 22:10:43 -0500 |
---|---|---|
committer | Richard Kuo <rkuo@codeaurora.org> | 2014-04-04 19:19:59 -0400 |
commit | 196b933d295975ada570dd8cc6e10b420cc83882 (patch) | |
tree | 41fe1317b382c579ab2b7f0f6b7b12142a4b8e79 /arch/hexagon | |
parent | d811d8cc549fcb4b5f19f4daeb0d08b57aa15627 (diff) |
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>
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/include/asm/delay.h | 1 | ||||
-rw-r--r-- | arch/hexagon/kernel/time.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h index 53079719d667..8933b9b1a3bf 100644 --- a/arch/hexagon/include/asm/delay.h +++ b/arch/hexagon/include/asm/delay.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/param.h> | 22 | #include <asm/param.h> |
23 | 23 | ||
24 | extern void __delay(unsigned long cycles); | ||
24 | extern void __udelay(unsigned long usecs); | 25 | extern void __udelay(unsigned long usecs); |
25 | 26 | ||
26 | #define udelay(usecs) __udelay((usecs)) | 27 | #define udelay(usecs) __udelay((usecs)) |
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index d0c4f5a04b7b..17fbf45bf150 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c | |||
@@ -229,6 +229,15 @@ void __init time_init(void) | |||
229 | late_time_init = time_init_deferred; | 229 | late_time_init = time_init_deferred; |
230 | } | 230 | } |
231 | 231 | ||
232 | void __delay(unsigned long cycles) | ||
233 | { | ||
234 | unsigned long long start = __vmgettime(); | ||
235 | |||
236 | while ((__vmgettime() - start) < cycles) | ||
237 | cpu_relax(); | ||
238 | } | ||
239 | EXPORT_SYMBOL(__delay); | ||
240 | |||
232 | /* | 241 | /* |
233 | * This could become parametric or perhaps even computed at run-time, | 242 | * This could become parametric or perhaps even computed at run-time, |
234 | * but for now we take the observed simulator jitter. | 243 | * but for now we take the observed simulator jitter. |