2012-10-18 12:43:25

by Thomas Meyer

[permalink] [raw]
Subject: "read_current_timer" undefined!

Hi,

ERROR: "read_current_timer" [drivers/gpu/drm/udl/udl.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!

"read_current_timer() is not an exported symbol so you cannot use it
from modules. This is most likely an error in the Kconfig entries for
those modules. They shouldn't be marked tristate. It seems like these
are pulled in by the get_cycles() macro that is both used in udl and
tcrypt."

kind regards
thomas


2012-10-19 06:20:08

by Alexander Holler

[permalink] [raw]
Subject: Re: "read_current_timer" undefined!

Hello,

Am 18.10.2012 14:16, schrieb Thomas Meyer:

> ERROR: "read_current_timer" [drivers/gpu/drm/udl/udl.ko] undefined!
> ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!

There is already a long thread about that, along with patches:

https://lkml.org/lkml/2012/10/9/393

If you need a patch for 3.6, here is what I did before I found the above
thread:

------------------------------
From a026451fdc98a5981e10a18ffa394e53a40b0691 Mon Sep 17 00:00:00 2001
From: Alexander Holler <[email protected]>
Date: Thu, 18 Oct 2012 07:29:39 +0200
Subject: [PATCH] arm: arch timer: export read_current_timer()

Exporting read_current_timmer is needed e.g. for users of get_cycles()
like udlfb which otherwise can't be build as a module.

This seems to have been forgotten in
commit 923df96b9f31b7d08d8438ff9677326d9537accf.

Cc: [email protected]
Signed-off-by: Alexander Holler <[email protected]>
---
arch/arm/kernel/arch_timer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index cf25880..7f24d1f 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -19,6 +19,7 @@
#include <linux/interrupt.h>
#include <linux/of_irq.h>
#include <linux/io.h>
+#include <linux/export.h>

#include <asm/cputype.h>
#include <asm/localtimer.h>
@@ -232,6 +233,7 @@ int read_current_timer(unsigned long *timer_val)
*timer_val = arch_counter_get_cntpct();
return 0;
}
+EXPORT_SYMBOL(read_current_timer);

static struct clocksource clocksource_counter = {
.name = "arch_sys_counter",
--
1.7.3.4
------------------------------

Regards,

Alexander

2012-10-19 09:18:38

by Will Deacon

[permalink] [raw]
Subject: Re: "read_current_timer" undefined!

On Fri, Oct 19, 2012 at 07:19:27AM +0100, Alexander Holler wrote:
> Hello,
>
> Am 18.10.2012 14:16, schrieb Thomas Meyer:
>
> > ERROR: "read_current_timer" [drivers/gpu/drm/udl/udl.ko] undefined!
> > ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
>
> There is already a long thread about that, along with patches:
>
> https://lkml.org/lkml/2012/10/9/393
>
> If you need a patch for 3.6, here is what I did before I found the above
> thread:

Arnd sent an updated pull request here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/124756.html

but it was a reply to a previous pull, so it may have been missed. Could you
pull that for -rc2 please Russell?

Thanks,

Will