From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] arch: hexagon: kernel: add export symbol function __delay()
Date: Tue, 19 Nov 2013 11:10:43 +0800 [thread overview]
Message-ID: <528AD6B3.1060507@gmail.com> (raw)
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
next reply other threads:[~2013-11-19 3:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 3:10 Chen Gang [this message]
2013-11-25 1:19 ` [PATCH] arch: hexagon: kernel: add export symbol function __delay() rkuo
2013-11-25 1:50 ` Chen Gang
2013-11-27 2:15 ` [PATCH] drivers: input: touchscreen: sur40: use static variable instead of stack varialbe for 'packet_id' Chen Gang
2013-11-28 4:07 ` Dmitry Torokhov
2013-11-28 4:24 ` Chen Gang
2013-11-28 4:34 ` [PATCH v2] drivers: input: touchscreen: sur40: remove stack variable 'packet_id' from sur40_poll() Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528AD6B3.1060507@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkuo@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).