arch: hexagon: kernel: add export symbol function __delay()
authorChen Gang <gang.chen.5i5j@gmail.com>
Tue, 19 Nov 2013 03:10:43 +0000 (11:10 +0800)
committerRichard Kuo <rkuo@codeaurora.org>
Fri, 4 Apr 2014 23:19:59 +0000 (18:19 -0500)
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>
arch/hexagon/include/asm/delay.h
arch/hexagon/kernel/time.c

index 53079719d6678d4105437986a371f901966a4c39..8933b9b1a3bfd39dc092f7941f5d9d8f9b235f20 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <asm/param.h>
 
+extern void __delay(unsigned long cycles);
 extern void __udelay(unsigned long usecs);
 
 #define udelay(usecs) __udelay((usecs))
index d0c4f5a04b7bea1829b0f681bae025dee61d8aa5..17fbf45bf1502ad4c7212346e9333b95d2914937 100644 (file)
@@ -229,6 +229,15 @@ void __init time_init(void)
        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,
  * but for now we take the observed simulator jitter.