diff mbox

[1/4] ARM: export read_current_timer

Message ID 1345645780-2749-2-git-send-email-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann Aug. 22, 2012, 2:29 p.m. UTC
read_current_timer is used in the get_cycles() function when
ARM_ARCH_TIMER is set, and that function can be inlined into
driver modules, so we should export the function to avoid
errors like

ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/arch_timer.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Stephen Boyd Aug. 22, 2012, 5:15 p.m. UTC | #1
On 08/22/12 07:29, Arnd Bergmann wrote:
> read_current_timer is used in the get_cycles() function when
> ARM_ARCH_TIMER is set, and that function can be inlined into
> driver modules, so we should export the function to avoid
> errors like
>
> ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
> ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

I ran into this last week but forgot to send the patch. Thanks.
Will Deacon Aug. 22, 2012, 5:49 p.m. UTC | #2
On Wed, Aug 22, 2012 at 06:15:14PM +0100, Stephen Boyd wrote:
> On 08/22/12 07:29, Arnd Bergmann wrote:
> > read_current_timer is used in the get_cycles() function when
> > ARM_ARCH_TIMER is set, and that function can be inlined into
> > driver modules, so we should export the function to avoid
> > errors like
> >
> > ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
> > ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Cc: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
> 
> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
> 
> I ran into this last week but forgot to send the patch. Thanks.

Looks good to me, thanks Arnd:

Acked-by: Will Deacon <will.deacon@arm.com>

On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
look at the registration stuff that was proposed? I'm happy to push it if
people will actually use it.

Cheers,

Will
Stephen Boyd Aug. 22, 2012, 5:57 p.m. UTC | #3
On 08/22/12 10:49, Will Deacon wrote:
> On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
> look at the registration stuff that was proposed? I'm happy to push it if
> people will actually use it.

Yes I have tested it on our internal trees and it looks good. I plan to
send a patch to move MSM's timers over to it later this week so that we
have at least two users upstream.
Will Deacon Aug. 22, 2012, 5:58 p.m. UTC | #4
On Wed, Aug 22, 2012 at 06:57:20PM +0100, Stephen Boyd wrote:
> On 08/22/12 10:49, Will Deacon wrote:
> > On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
> > look at the registration stuff that was proposed? I'm happy to push it if
> > people will actually use it.
> 
> Yes I have tested it on our internal trees and it looks good. I plan to
> send a patch to move MSM's timers over to it later this week so that we
> have at least two users upstream.

Awesome, I'll dust that series off at -rc3 then.

Will
Shinya Kuribayashi Aug. 23, 2012, 3:56 a.m. UTC | #5
On 8/23/2012 2:49 AM, Will Deacon wrote:
> On Wed, Aug 22, 2012 at 06:15:14PM +0100, Stephen Boyd wrote:
>> On 08/22/12 07:29, Arnd Bergmann wrote:
>>> read_current_timer is used in the get_cycles() function when
>>> ARM_ARCH_TIMER is set, and that function can be inlined into
>>> driver modules, so we should export the function to avoid
>>> errors like
>>>
>>> ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
>>> ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> Cc: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
>>
>> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
>>
>> I ran into this last week but forgot to send the patch. Thanks.
> 
> Looks good to me, thanks Arnd:
> 
> Acked-by: Will Deacon <will.deacon@arm.com>

I haven't hit with this so far with our configs though, but why not?

Acked-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Shinya Kuribayashi Aug. 23, 2012, 4:23 a.m. UTC | #6
On 8/23/2012 2:58 AM, Will Deacon wrote:
> On Wed, Aug 22, 2012 at 06:57:20PM +0100, Stephen Boyd wrote:
>> On 08/22/12 10:49, Will Deacon wrote:
>>> On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
>>> look at the registration stuff that was proposed? I'm happy to push it if
>>> people will actually use it.
>>
>> Yes I have tested it on our internal trees and it looks good. I plan to
>> send a patch to move MSM's timers over to it later this week so that we
>> have at least two users upstream.

And I think other A9 MPcore platforms, namely OMAP and EXYNOS, would
also be candidates, who tried to skip calibrate_delay() in the past
(OMAP) or currently provide non-smp_twd timers as localtimers (EXYNOS).
I may miss the latest status of those BSPs, but believe that we would
have more users (>2) in the future.

> Awesome, I'll dust that series off at -rc3 then.

It works for me for weeks without troubles, looking forward to it.
--
Shinya Kuribayashi
Renesas Electronics
diff mbox

Patch

diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index cf25880..6327d1f 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -14,6 +14,7 @@ 
 #include <linux/device.h>
 #include <linux/smp.h>
 #include <linux/cpu.h>
+#include <linux/export.h>
 #include <linux/jiffies.h>
 #include <linux/clockchips.h>
 #include <linux/interrupt.h>
@@ -232,6 +233,7 @@  int read_current_timer(unsigned long *timer_val)
 	*timer_val = arch_counter_get_cntpct();
 	return 0;
 }
+EXPORT_SYMBOL_GPL(read_current_timer);
 
 static struct clocksource clocksource_counter = {
 	.name	= "arch_sys_counter",