* [PATCH] arch: hexagon: kernel: add export symbol function __delay()
@ 2013-11-19 3:10 Chen Gang
2013-11-25 1:19 ` rkuo
0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-11-19 3:10 UTC (permalink / raw)
To: Richard Kuo; +Cc: linux-hexagon, linux-kernel@vger.kernel.org
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>
---
arch/hexagon/include/asm/delay.h | 1 +
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 5307971..8933b9b1 100644
--- a/arch/hexagon/include/asm/delay.h
+++ b/arch/hexagon/include/asm/delay.h
@@ -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))
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
index d0c4f5a..17fbf45 100644
--- a/arch/hexagon/kernel/time.c
+++ b/arch/hexagon/kernel/time.c
@@ -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.
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arch: hexagon: kernel: add export symbol function __delay()
2013-11-19 3:10 [PATCH] arch: hexagon: kernel: add export symbol function __delay() Chen Gang
@ 2013-11-25 1:19 ` rkuo
2013-11-25 1:50 ` Chen Gang
0 siblings, 1 reply; 3+ messages in thread
From: rkuo @ 2013-11-25 1:19 UTC (permalink / raw)
To: Chen Gang; +Cc: linux-hexagon, linux-kernel@vger.kernel.org
On Tue, Nov 19, 2013 at 11:10:43AM +0800, Chen Gang wrote:
> 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>
> ---
> arch/hexagon/include/asm/delay.h | 1 +
> arch/hexagon/kernel/time.c | 9 +++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
Thanks again for all the cleanups. I've tested this and the rest of your
patches on my internal tree and everything checks out.
Also just to let you know, I'm still waiting to hear back on that compiler
bug.
Acked-by: Richard Kuo <rkuo@codeaurora.org>
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arch: hexagon: kernel: add export symbol function __delay()
2013-11-25 1:19 ` rkuo
@ 2013-11-25 1:50 ` Chen Gang
0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-11-25 1:50 UTC (permalink / raw)
To: rkuo; +Cc: linux-hexagon, linux-kernel@vger.kernel.org
On 11/25/2013 09:19 AM, rkuo wrote:
> On Tue, Nov 19, 2013 at 11:10:43AM +0800, Chen Gang wrote:
>> 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>
>> ---
>> arch/hexagon/include/asm/delay.h | 1 +
>> arch/hexagon/kernel/time.c | 9 +++++++++
>> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> Thanks again for all the cleanups. I've tested this and the rest of your
> patches on my internal tree and everything checks out.
>
OK, thanks. I will/should continue. :-)
> Also just to let you know, I'm still waiting to hear back on that compiler
> bug.
>
If necessary/suitable, can let me join to the related communication.
>
>
> Acked-by: Richard Kuo <rkuo@codeaurora.org>
>
Thanks.
--
Chen Gang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-25 1:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 3:10 [PATCH] arch: hexagon: kernel: add export symbol function __delay() Chen Gang
2013-11-25 1:19 ` rkuo
2013-11-25 1:50 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).