All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Exporting __ipipe_get_cs_tsc
@ 2012-10-09 12:32 Henri Roosen
  2012-10-09 14:10 ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Roosen @ 2012-10-09 12:32 UTC (permalink / raw)
  To: xenomai

Hi,

I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
with the attached config file.

When compiling the modules I get undefined symbols:
ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
undefined!

This is because the run time seleted __ipipe_get_cs_tsc assembly
function is not exported for module use.
I don't know how to export this or whether the symbol should be used
by modules in the first place.

Please advice.

Thanks,
Henri.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/octet-stream
Size: 57776 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121009/524a0516/attachment.obj>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] Exporting __ipipe_get_cs_tsc
  2012-10-09 12:32 [Xenomai] Exporting __ipipe_get_cs_tsc Henri Roosen
@ 2012-10-09 14:10 ` Philippe Gerum
  2012-10-09 15:24   ` Henri Roosen
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2012-10-09 14:10 UTC (permalink / raw)
  To: xenomai

On 10/09/2012 02:32 PM, Henri Roosen wrote:
> Hi,
> 
> I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
> with the attached config file.
> 
> When compiling the modules I get undefined symbols:
> ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
> undefined!
> 
> This is because the run time seleted __ipipe_get_cs_tsc assembly
> function is not exported for module use.
> I don't know how to export this or whether the symbol should be used
> by modules in the first place.
> 

Please try this:

diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
index 430aeea..2d2f83c 100644
--- a/arch/x86/kernel/ipipe.c
+++ b/arch/x86/kernel/ipipe.c
@@ -634,6 +634,11 @@ void update_vsyscall(struct timespec *wall_time,
struct timespec *wtm,
 void update_vsyscall_tz(void)
 {
 }
+
+#ifdef CONFIG_IPIPE_WANT_CLOCKSOURCE
+EXPORT_SYMBOL_GPL(__ipipe_get_cs_tsc);
+#endif
+
 #endif /* CONFIG_X86_32 */

 struct task_struct *__switch_to(struct task_struct *prev_p,
> Please advice.
> 
> Thanks,
> Henri.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: .config
> Type: application/octet-stream
> Size: 57776 bytes
> Desc: not available
> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121009/524a0516/attachment.obj>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
> 


-- 
Philippe.


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Xenomai] Exporting __ipipe_get_cs_tsc
  2012-10-09 14:10 ` Philippe Gerum
@ 2012-10-09 15:24   ` Henri Roosen
  2012-10-09 15:27     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Roosen @ 2012-10-09 15:24 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

On Tue, Oct 9, 2012 at 4:10 PM, Philippe Gerum <rpm@xenomai.org> wrote:
> On 10/09/2012 02:32 PM, Henri Roosen wrote:
>> Hi,
>>
>> I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
>> with the attached config file.
>>
>> When compiling the modules I get undefined symbols:
>> ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
>> undefined!
>>
>> This is because the run time seleted __ipipe_get_cs_tsc assembly
>> function is not exported for module use.
>> I don't know how to export this or whether the symbol should be used
>> by modules in the first place.
>>
>
> Please try this:
>
> diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
> index 430aeea..2d2f83c 100644
> --- a/arch/x86/kernel/ipipe.c
> +++ b/arch/x86/kernel/ipipe.c
> @@ -634,6 +634,11 @@ void update_vsyscall(struct timespec *wall_time,
> struct timespec *wtm,
>  void update_vsyscall_tz(void)
>  {
>  }
> +
> +#ifdef CONFIG_IPIPE_WANT_CLOCKSOURCE
> +EXPORT_SYMBOL_GPL(__ipipe_get_cs_tsc);
> +#endif
> +
>  #endif /* CONFIG_X86_32 */
>
>  struct task_struct *__switch_to(struct task_struct *prev_p,

Thanks for looking into this.

Unfortunately with the patch the compile results in:
arch/x86/kernel/ipipe.c:640: error: ‘__ipipe_get_cs_tsc’ undeclared
here (not in a function)

>> Please advice.
>>
>> Thanks,
>> Henri.
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: .config
>> Type: application/octet-stream
>> Size: 57776 bytes
>> Desc: not available
>> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121009/524a0516/attachment.obj>
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai@xenomai.org
>> http://www.xenomai.org/mailman/listinfo/xenomai
>>
>
>
> --
> Philippe.
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] Exporting __ipipe_get_cs_tsc
  2012-10-09 15:24   ` Henri Roosen
@ 2012-10-09 15:27     ` Gilles Chanteperdrix
  2012-10-09 15:28       ` Henri Roosen
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2012-10-09 15:27 UTC (permalink / raw)
  To: Henri Roosen; +Cc: xenomai

On 10/09/2012 05:24 PM, Henri Roosen wrote:
> On Tue, Oct 9, 2012 at 4:10 PM, Philippe Gerum <rpm@xenomai.org> wrote:
>> On 10/09/2012 02:32 PM, Henri Roosen wrote:
>>> Hi,
>>>
>>> I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
>>> with the attached config file.
>>>
>>> When compiling the modules I get undefined symbols:
>>> ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
>>> undefined!
>>>
>>> This is because the run time seleted __ipipe_get_cs_tsc assembly
>>> function is not exported for module use.
>>> I don't know how to export this or whether the symbol should be used
>>> by modules in the first place.
>>>
>>
>> Please try this:
>>
>> diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
>> index 430aeea..2d2f83c 100644
>> --- a/arch/x86/kernel/ipipe.c
>> +++ b/arch/x86/kernel/ipipe.c
>> @@ -634,6 +634,11 @@ void update_vsyscall(struct timespec *wall_time,
>> struct timespec *wtm,
>>  void update_vsyscall_tz(void)
>>  {
>>  }
>> +
>> +#ifdef CONFIG_IPIPE_WANT_CLOCKSOURCE
>> +EXPORT_SYMBOL_GPL(__ipipe_get_cs_tsc);
>> +#endif
>> +
>>  #endif /* CONFIG_X86_32 */
>>
>>  struct task_struct *__switch_to(struct task_struct *prev_p,
> 
> Thanks for looking into this.
> 
> Unfortunately with the patch the compile results in:
> arch/x86/kernel/ipipe.c:640: error: ‘__ipipe_get_cs_tsc’ undeclared
> here (not in a function)

The function is declared nowhere, because it was supposedly only be used
in assembly. So, you need to declare the function before the
EXPORT_SYMBOL. Its prototype would be:

unsigned long long __ipipe_get_tsc_tsc(void);

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] Exporting __ipipe_get_cs_tsc
  2012-10-09 15:27     ` Gilles Chanteperdrix
@ 2012-10-09 15:28       ` Henri Roosen
  2012-10-09 15:30         ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Roosen @ 2012-10-09 15:28 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Tue, Oct 9, 2012 at 5:27 PM, Gilles Chanteperdrix
<gilles.chanteperdrix@xenomai.org> wrote:
> On 10/09/2012 05:24 PM, Henri Roosen wrote:
>> On Tue, Oct 9, 2012 at 4:10 PM, Philippe Gerum <rpm@xenomai.org> wrote:
>>> On 10/09/2012 02:32 PM, Henri Roosen wrote:
>>>> Hi,
>>>>
>>>> I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
>>>> with the attached config file.
>>>>
>>>> When compiling the modules I get undefined symbols:
>>>> ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
>>>> undefined!
>>>>
>>>> This is because the run time seleted __ipipe_get_cs_tsc assembly
>>>> function is not exported for module use.
>>>> I don't know how to export this or whether the symbol should be used
>>>> by modules in the first place.
>>>>
>>>
>>> Please try this:
>>>
>>> diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
>>> index 430aeea..2d2f83c 100644
>>> --- a/arch/x86/kernel/ipipe.c
>>> +++ b/arch/x86/kernel/ipipe.c
>>> @@ -634,6 +634,11 @@ void update_vsyscall(struct timespec *wall_time,
>>> struct timespec *wtm,
>>>  void update_vsyscall_tz(void)
>>>  {
>>>  }
>>> +
>>> +#ifdef CONFIG_IPIPE_WANT_CLOCKSOURCE
>>> +EXPORT_SYMBOL_GPL(__ipipe_get_cs_tsc);
>>> +#endif
>>> +
>>>  #endif /* CONFIG_X86_32 */
>>>
>>>  struct task_struct *__switch_to(struct task_struct *prev_p,
>>
>> Thanks for looking into this.
>>
>> Unfortunately with the patch the compile results in:
>> arch/x86/kernel/ipipe.c:640: error: ‘__ipipe_get_cs_tsc’ undeclared
>> here (not in a function)
>
> The function is declared nowhere, because it was supposedly only be used
> in assembly. So, you need to declare the function before the
> EXPORT_SYMBOL. Its prototype would be:
>
> unsigned long long __ipipe_get_tsc_tsc(void);

I tried that and I can confirm it works.

>
> --
>                                             Gilles.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] Exporting __ipipe_get_cs_tsc
  2012-10-09 15:28       ` Henri Roosen
@ 2012-10-09 15:30         ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2012-10-09 15:30 UTC (permalink / raw)
  To: Henri Roosen; +Cc: xenomai

On 10/09/2012 05:28 PM, Henri Roosen wrote:
> On Tue, Oct 9, 2012 at 5:27 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> On 10/09/2012 05:24 PM, Henri Roosen wrote:
>>> On Tue, Oct 9, 2012 at 4:10 PM, Philippe Gerum <rpm@xenomai.org> wrote:
>>>> On 10/09/2012 02:32 PM, Henri Roosen wrote:
>>>>> Hi,
>>>>>
>>>>> I'm using the current git heads of core-3.4 and xenomai 2.6.1 for x86
>>>>> with the attached config file.
>>>>>
>>>>> When compiling the modules I get undefined symbols:
>>>>> ERROR: "__ipipe_get_cs_tsc" [kernel/xenomai/skins/posix/xeno_posix.ko]
>>>>> undefined!
>>>>>
>>>>> This is because the run time seleted __ipipe_get_cs_tsc assembly
>>>>> function is not exported for module use.
>>>>> I don't know how to export this or whether the symbol should be used
>>>>> by modules in the first place.
>>>>>
>>>>
>>>> Please try this:
>>>>
>>>> diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
>>>> index 430aeea..2d2f83c 100644
>>>> --- a/arch/x86/kernel/ipipe.c
>>>> +++ b/arch/x86/kernel/ipipe.c
>>>> @@ -634,6 +634,11 @@ void update_vsyscall(struct timespec *wall_time,
>>>> struct timespec *wtm,
>>>>  void update_vsyscall_tz(void)
>>>>  {
>>>>  }
>>>> +
>>>> +#ifdef CONFIG_IPIPE_WANT_CLOCKSOURCE
>>>> +EXPORT_SYMBOL_GPL(__ipipe_get_cs_tsc);
>>>> +#endif
>>>> +
>>>>  #endif /* CONFIG_X86_32 */
>>>>
>>>>  struct task_struct *__switch_to(struct task_struct *prev_p,
>>>
>>> Thanks for looking into this.
>>>
>>> Unfortunately with the patch the compile results in:
>>> arch/x86/kernel/ipipe.c:640: error: ‘__ipipe_get_cs_tsc’ undeclared
>>> here (not in a function)
>>
>> The function is declared nowhere, because it was supposedly only be used
>> in assembly. So, you need to declare the function before the
>> EXPORT_SYMBOL. Its prototype would be:
>>
>> unsigned long long __ipipe_get_tsc_tsc(void);
> 
> I tried that and I can confirm it works.
> 

Ok, pushing the fix.

>>
>> --
>>                                             Gilles.
> 


-- 
Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-09 15:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09 12:32 [Xenomai] Exporting __ipipe_get_cs_tsc Henri Roosen
2012-10-09 14:10 ` Philippe Gerum
2012-10-09 15:24   ` Henri Roosen
2012-10-09 15:27     ` Gilles Chanteperdrix
2012-10-09 15:28       ` Henri Roosen
2012-10-09 15:30         ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.