All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] patch for RPI2
@ 2015-12-15 12:22 ilyasse toumi
  2015-12-15 18:43 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: ilyasse toumi @ 2015-12-15 12:22 UTC (permalink / raw)
  To: xenomai

Hi there,

I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
for RPI2 version5, the problem is that when i try to compile the kernel
after patching it it gives some errors.
It's about some implicit declarations of functions that are present in the
patch like

__ipipe_mach_update_tsc
smp_mb__before_atomic_dec
smp_mb__before_atomic_dec
....

Could someone please help me solve these errors.

Or if someone succeeded in patching the Kernel for RPI2, please provide a
tutorial o some help with details

​thanks in advance

--

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

* Re: [Xenomai] patch for RPI2
  2015-12-15 12:22 [Xenomai] patch for RPI2 ilyasse toumi
@ 2015-12-15 18:43 ` Gilles Chanteperdrix
  2015-12-16  3:12   ` Mathieu Rondonneau
  0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-15 18:43 UTC (permalink / raw)
  To: ilyasse toumi; +Cc: xenomai

On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
> Hi there,
> 
> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
> for RPI2 version5, the problem is that when i try to compile the kernel
> after patching it it gives some errors.
> It's about some implicit declarations of functions that are present in the
> patch like
> 
> __ipipe_mach_update_tsc

This one is probably due to a misconfiguration, i.e. you enabled
xenomai, but not a SOC or SOC family which provides an emulated tsc.
A lot of the coded added by the patch is compiled conditionally, so
the fact that a definition for a function is present in the patch
does not necessarily mean that it will be present with your
particular build configuration.

> smp_mb__before_atomic_dec
> smp_mb__before_atomic_dec

This one indicates a version of Xenomai not ready for Linux 3.18.
Xenomai 2.6.4 for instance can not be compiled with anything more
recent than Linux 3.14. You can use Xenomai 2.6 git if you want
Linux 3.18 support, or if starting a new development, it probably
makes more sense to jump to Xenomai 3.0 directly.

Regards.

-- 
					    Gilles.
https://click-hack.org


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

* Re: [Xenomai] patch for RPI2
  2015-12-15 18:43 ` Gilles Chanteperdrix
@ 2015-12-16  3:12   ` Mathieu Rondonneau
  2015-12-16  6:42     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Rondonneau @ 2015-12-16  3:12 UTC (permalink / raw)
  To: Gilles Chanteperdrix, ilyasse toumi; +Cc: xenomai

On 15-12-15 10:43 AM, Gilles Chanteperdrix wrote:
> On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
>> Hi there,
>>
>> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
>> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
>> for RPI2 version5, the problem is that when i try to compile the kernel
>> after patching it it gives some errors.
>> It's about some implicit declarations of functions that are present in the
>> patch like
>>
>> __ipipe_mach_update_tsc
> 
> This one is probably due to a misconfiguration, i.e. you enabled
> xenomai, but not a SOC or SOC family which provides an emulated tsc.
> A lot of the coded added by the patch is compiled conditionally, so
> the fact that a definition for a function is present in the patch
> does not necessarily mean that it will be present with your
> particular build configuration.
>
if you do use Xenomai-3.0, it could be that you are missing this part of
the patch?
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4860d5f..1194e5d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -829,6 +829,7 @@ config ARCH_BCM2709
select VC4
select FIQ
# select ZONE_DMA
+ select IPIPE_ARM_KUSER_TSC if IPIPE
help
This enables support for Broadcom BCM2709 boards.


>> smp_mb__before_atomic_dec
>> smp_mb__before_atomic_dec
> 
> This one indicates a version of Xenomai not ready for Linux 3.18.
> Xenomai 2.6.4 for instance can not be compiled with anything more
> recent than Linux 3.14. You can use Xenomai 2.6 git if you want
> Linux 3.18 support, or if starting a new development, it probably
> makes more sense to jump to Xenomai 3.0 directly.
> 
> Regards.
> 
That is correct, the patch is only for Xenomai 3.0.
-Mathieu


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

* Re: [Xenomai] patch for RPI2
  2015-12-16  3:12   ` Mathieu Rondonneau
@ 2015-12-16  6:42     ` Gilles Chanteperdrix
  2015-12-18  7:40       ` Joe Lee
  0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-16  6:42 UTC (permalink / raw)
  To: Mathieu Rondonneau; +Cc: ilyasse toumi, xenomai

On Tue, Dec 15, 2015 at 07:12:26PM -0800, Mathieu Rondonneau wrote:
> On 15-12-15 10:43 AM, Gilles Chanteperdrix wrote:
> > On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
> >> Hi there,
> >>
> >> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
> >> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
> >> for RPI2 version5, the problem is that when i try to compile the kernel
> >> after patching it it gives some errors.
> >> It's about some implicit declarations of functions that are present in the
> >> patch like
> >>
> >> __ipipe_mach_update_tsc
> > 
> > This one is probably due to a misconfiguration, i.e. you enabled
> > xenomai, but not a SOC or SOC family which provides an emulated tsc.
> > A lot of the coded added by the patch is compiled conditionally, so
> > the fact that a definition for a function is present in the patch
> > does not necessarily mean that it will be present with your
> > particular build configuration.
> >
> if you do use Xenomai-3.0, it could be that you are missing this part of
> the patch?

More likely, the SOC is not enabled in the kernel configuration.

> >> smp_mb__before_atomic_dec
> >> smp_mb__before_atomic_dec
> > 
> > This one indicates a version of Xenomai not ready for Linux 3.18.
> > Xenomai 2.6.4 for instance can not be compiled with anything more
> > recent than Linux 3.14. You can use Xenomai 2.6 git if you want
> > Linux 3.18 support, or if starting a new development, it probably
> > makes more sense to jump to Xenomai 3.0 directly.
> > 
> > Regards.
> > 
> That is correct, the patch is only for Xenomai 3.0.

No. The patch should also work with Xenomai 2.6, but you need
Xenomai 2.6 git.

-- 
					    Gilles.
https://click-hack.org


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

* Re: [Xenomai] patch for RPI2
  2015-12-16  6:42     ` Gilles Chanteperdrix
@ 2015-12-18  7:40       ` Joe Lee
  2015-12-18 12:41         ` ilyasse toumi
  2015-12-20 15:11         ` Gilles Chanteperdrix
  0 siblings, 2 replies; 8+ messages in thread
From: Joe Lee @ 2015-12-18  7:40 UTC (permalink / raw)
  To: xenomai, Mathieu Rondonneau, gilles.chanteperdrix; +Cc: ilyasse toumi

On Wednesday, December 16, 2015 02:42 PM, Gilles Chanteperdrix wrote:
> On Tue, Dec 15, 2015 at 07:12:26PM -0800, Mathieu Rondonneau wrote:
>> On 15-12-15 10:43 AM, Gilles Chanteperdrix wrote:
>>> On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
>>>> Hi there,
>>>>
>>>> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
>>>> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
>>>> for RPI2 version5, the problem is that when i try to compile the kernel
>>>> after patching it it gives some errors.
>>>> It's about some implicit declarations of functions that are present in the
>>>> patch like
>>>>
>>>> __ipipe_mach_update_tsc
>>>
>>> This one is probably due to a misconfiguration, i.e. you enabled
>>> xenomai, but not a SOC or SOC family which provides an emulated tsc.
>>> A lot of the coded added by the patch is compiled conditionally, so
>>> the fact that a definition for a function is present in the patch
>>> does not necessarily mean that it will be present with your
>>> particular build configuration.
>>>
>> if you do use Xenomai-3.0, it could be that you are missing this part of
>> the patch?
>
> More likely, the SOC is not enabled in the kernel configuration.
>
>>>> smp_mb__before_atomic_dec
>>>> smp_mb__before_atomic_dec
>>>
>>> This one indicates a version of Xenomai not ready for Linux 3.18.
>>> Xenomai 2.6.4 for instance can not be compiled with anything more
>>> recent than Linux 3.14. You can use Xenomai 2.6 git if you want
>>> Linux 3.18 support, or if starting a new development, it probably
>>> makes more sense to jump to Xenomai 3.0 directly.
>>>
>>> Regards.
>>>
>> That is correct, the patch is only for Xenomai 3.0.
>
> No. The patch should also work with Xenomai 2.6, but you need
> Xenomai 2.6 git.
>
Hi Gilles,
The Xenomai 3.0.1 patched kernel is OK. But the Xenomai 2.6 patched 
sometimes hang like this:
[7.407819] Xenomai: stuck on nucleus lock 808b14a0
[7.407819]    waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #2)
[7.407819]    owner  = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #1)
Could you help me?

-- 
Joe Lee


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

* Re: [Xenomai] patch for RPI2
  2015-12-18  7:40       ` Joe Lee
@ 2015-12-18 12:41         ` ilyasse toumi
  2015-12-20 15:07           ` Gilles Chanteperdrix
  2015-12-20 15:11         ` Gilles Chanteperdrix
  1 sibling, 1 reply; 8+ messages in thread
From: ilyasse toumi @ 2015-12-18 12:41 UTC (permalink / raw)
  To: Joe Lee; +Cc: gilles.chanteperdrix, xenomai

Hi there

I used the same kernel (rpi-3.18.y) but this time with Xenomai 3.0.1. the
patch seems to be OK. After building it i used it with Raspbian root file
system.
I launched the latency test in both x86 and RPI2. x86 response time is of
the order of several microseconds, but RPI2 response time is of the order
of a few ten microseconds.

To summarize, the problem was with Xenomai 2 ( I didn't use git version )
and also SOC should be enabled. Now I am planning to port Xenomai on Orange
Pi, It should not be very hard since they have the  same CPU

On Fri, Dec 18, 2015 at 8:40 AM, Joe Lee <joelee271828@gmail.com> wrote:

> On Wednesday, December 16, 2015 02:42 PM, Gilles Chanteperdrix wrote:
>
>> On Tue, Dec 15, 2015 at 07:12:26PM -0800, Mathieu Rondonneau wrote:
>>
>>> On 15-12-15 10:43 AM, Gilles Chanteperdrix wrote:
>>>
>>>> On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
>>>>
>>>>> Hi there,
>>>>>
>>>>> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee
>>>>> about
>>>>> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the
>>>>> patch
>>>>> for RPI2 version5, the problem is that when i try to compile the kernel
>>>>> after patching it it gives some errors.
>>>>> It's about some implicit declarations of functions that are present in
>>>>> the
>>>>> patch like
>>>>>
>>>>> __ipipe_mach_update_tsc
>>>>>
>>>>
>>>> This one is probably due to a misconfiguration, i.e. you enabled
>>>> xenomai, but not a SOC or SOC family which provides an emulated tsc.
>>>> A lot of the coded added by the patch is compiled conditionally, so
>>>> the fact that a definition for a function is present in the patch
>>>> does not necessarily mean that it will be present with your
>>>> particular build configuration.
>>>>
>>>> if you do use Xenomai-3.0, it could be that you are missing this part of
>>> the patch?
>>>
>>
>> More likely, the SOC is not enabled in the kernel configuration.
>>
>> smp_mb__before_atomic_dec
>>>>> smp_mb__before_atomic_dec
>>>>>
>>>>
>>>> This one indicates a version of Xenomai not ready for Linux 3.18.
>>>> Xenomai 2.6.4 for instance can not be compiled with anything more
>>>> recent than Linux 3.14. You can use Xenomai 2.6 git if you want
>>>> Linux 3.18 support, or if starting a new development, it probably
>>>> makes more sense to jump to Xenomai 3.0 directly.
>>>>
>>>> Regards.
>>>>
>>>> That is correct, the patch is only for Xenomai 3.0.
>>>
>>
>> No. The patch should also work with Xenomai 2.6, but you need
>> Xenomai 2.6 git.
>>
>> Hi Gilles,
> The Xenomai 3.0.1 patched kernel is OK. But the Xenomai 2.6 patched
> sometimes hang like this:
> [7.407819] Xenomai: stuck on nucleus lock 808b14a0
> [7.407819]    waiter = kernel/xenomai/nucleus/intr.c:114
> (xnintr_clock_handler(), CPU #2)
> [7.407819]    owner  = kernel/xenomai/nucleus/intr.c:114
> (xnintr_clock_handler(), CPU #1)
> Could you help me?
>
> --
> Joe Lee
>



-- 
--
Ilyasse Toumi
Embedded system engineer
Graduate student of ISAE Supaero
+33 6 50 59 13 42

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

* Re: [Xenomai] patch for RPI2
  2015-12-18 12:41         ` ilyasse toumi
@ 2015-12-20 15:07           ` Gilles Chanteperdrix
  0 siblings, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-20 15:07 UTC (permalink / raw)
  To: ilyasse toumi; +Cc: Joe Lee, xenomai

On Fri, Dec 18, 2015 at 01:41:50PM +0100, ilyasse toumi wrote:
> Hi there
> 
> I used the same kernel (rpi-3.18.y) but this time with Xenomai 3.0.1. the
> patch seems to be OK. After building it i used it with Raspbian root file
> system.
> I launched the latency test in both x86 and RPI2. x86 response time is of
> the order of several microseconds, but RPI2 response time is of the order
> of a few ten microseconds.
> 
> To summarize, the problem was with Xenomai 2 ( I didn't use git version )
> and also SOC should be enabled. Now I am planning to port Xenomai on Orange
> Pi, It should not be very hard since they have the  same CPU

I think you did not understand my answer correctly. I never said
that the problem was with Xenomai 2. The problem is that Xenomai
2.6.4 is too old for Linux 3.18. Please do not spread false rumors.

-- 
					    Gilles.
https://click-hack.org


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

* Re: [Xenomai] patch for RPI2
  2015-12-18  7:40       ` Joe Lee
  2015-12-18 12:41         ` ilyasse toumi
@ 2015-12-20 15:11         ` Gilles Chanteperdrix
  1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-20 15:11 UTC (permalink / raw)
  To: Joe Lee; +Cc: ilyasse toumi, xenomai

On Fri, Dec 18, 2015 at 03:40:31PM +0800, Joe Lee wrote:
> On Wednesday, December 16, 2015 02:42 PM, Gilles Chanteperdrix wrote:
> > On Tue, Dec 15, 2015 at 07:12:26PM -0800, Mathieu Rondonneau wrote:
> >> On 15-12-15 10:43 AM, Gilles Chanteperdrix wrote:
> >>> On Tue, Dec 15, 2015 at 01:22:55PM +0100, ilyasse toumi wrote:
> >>>> Hi there,
> >>>>
> >>>> I'm using kernel rpi-3.18.y as mentioned in an email sent by Joe Lee about
> >>>> RPI2, I used the patch ipipe-core-3.18.20-arm-6.patch and also the patch
> >>>> for RPI2 version5, the problem is that when i try to compile the kernel
> >>>> after patching it it gives some errors.
> >>>> It's about some implicit declarations of functions that are present in the
> >>>> patch like
> >>>>
> >>>> __ipipe_mach_update_tsc
> >>>
> >>> This one is probably due to a misconfiguration, i.e. you enabled
> >>> xenomai, but not a SOC or SOC family which provides an emulated tsc.
> >>> A lot of the coded added by the patch is compiled conditionally, so
> >>> the fact that a definition for a function is present in the patch
> >>> does not necessarily mean that it will be present with your
> >>> particular build configuration.
> >>>
> >> if you do use Xenomai-3.0, it could be that you are missing this part of
> >> the patch?
> >
> > More likely, the SOC is not enabled in the kernel configuration.
> >
> >>>> smp_mb__before_atomic_dec
> >>>> smp_mb__before_atomic_dec
> >>>
> >>> This one indicates a version of Xenomai not ready for Linux 3.18.
> >>> Xenomai 2.6.4 for instance can not be compiled with anything more
> >>> recent than Linux 3.14. You can use Xenomai 2.6 git if you want
> >>> Linux 3.18 support, or if starting a new development, it probably
> >>> makes more sense to jump to Xenomai 3.0 directly.
> >>>
> >>> Regards.
> >>>
> >> That is correct, the patch is only for Xenomai 3.0.
> >
> > No. The patch should also work with Xenomai 2.6, but you need
> > Xenomai 2.6 git.
> >
> Hi Gilles,
> The Xenomai 3.0.1 patched kernel is OK. But the Xenomai 2.6 patched 
> sometimes hang like this:
> [7.407819] Xenomai: stuck on nucleus lock 808b14a0
> [7.407819]    waiter = kernel/xenomai/nucleus/intr.c:114
> (xnintr_clock_handler(), CPU #2)
> [7.407819]    owner  = kernel/xenomai/nucleus/intr.c:114
> (xnintr_clock_handler(), CPU #1)
> Could you help me?

Enable the I-pipe tracer, and trigger a trace freeze/trace dump upon
such failure. But since Xenomai 2.6 is running fine on other
platforms, it points to a problem in the RPi2 patch.

-- 
					    Gilles.
https://click-hack.org


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

end of thread, other threads:[~2015-12-20 15:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 12:22 [Xenomai] patch for RPI2 ilyasse toumi
2015-12-15 18:43 ` Gilles Chanteperdrix
2015-12-16  3:12   ` Mathieu Rondonneau
2015-12-16  6:42     ` Gilles Chanteperdrix
2015-12-18  7:40       ` Joe Lee
2015-12-18 12:41         ` ilyasse toumi
2015-12-20 15:07           ` Gilles Chanteperdrix
2015-12-20 15:11         ` Gilles Chanteperdrix
     [not found] <mailman.3.1450263601.11243.xenomai@xenomai.org>

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.