Philippe Gerum | 1 May 09:45 2012

Re: Powerpc alignment exception

On 04/30/2012 07:55 PM, Makarand Pradhan wrote:
> Hi,
>
> There has been a thread on this topic in the past:
>
> https://mail.gna.org/public/xenomai-help/2009-08/msg00023.html
>
> A quick background: We get the alignment exception, as we pass
> -fpack-struct option to gcc and some data in structures is misaligned.
>
> I have been testing the patch on Linux 3.0.0, Xenomai 2.6 and it seems
> to work well. Do you think, it requires any additional changes to be
> used with Xenomai 2.6?

This is not related to the Xenomai core, this is a pipeline issue. You 
can use whatever pipeline patch you need to.

>
> Also, I am trying to understand how it works and have a question. Am
> summarizing my understanding below. Would appreciate your comments:
>
> alignment_exception:
>
> + if (test_bit(IPIPE_NOSTACK_FLAG, &ipipe_this_cpudom_var(status)) &&
> + ipipe_trap_notify(IPIPE_TRAP_ALIGNMENT, regs))
> return;
>
> I believe, the IPIPE_NOSTACK_FLAG is set when we are running in Linux.

NOSTACK means "no linux task stack", i.e. Xenomai kernel thread context, 
(Continue reading)

Makarand Pradhan | 1 May 16:56 2012

Re: Powerpc alignment exception

Thanks Philippe. That helps.

Rgds,
Makarand.

On 01/05/12 03:45 AM, Philippe Gerum wrote:
> On 04/30/2012 07:55 PM, Makarand Pradhan wrote:
>> Hi,
>>
>> There has been a thread on this topic in the past:
>>
>> https://mail.gna.org/public/xenomai-help/2009-08/msg00023.html
>>
>> A quick background: We get the alignment exception, as we pass
>> -fpack-struct option to gcc and some data in structures is misaligned.
>>
>> I have been testing the patch on Linux 3.0.0, Xenomai 2.6 and it seems
>> to work well. Do you think, it requires any additional changes to be
>> used with Xenomai 2.6?
> This is not related to the Xenomai core, this is a pipeline issue. You
> can use whatever pipeline patch you need to.
>
>> Also, I am trying to understand how it works and have a question. Am
>> summarizing my understanding below. Would appreciate your comments:
>>
>> alignment_exception:
>>
>> + if (test_bit(IPIPE_NOSTACK_FLAG,&ipipe_this_cpudom_var(status))&&
>> + ipipe_trap_notify(IPIPE_TRAP_ALIGNMENT, regs))
>> return;
(Continue reading)

Gilles Chanteperdrix | 1 May 18:26 2012

Re: Interrupt latency greater than 250ms

On 04/26/2012 12:39 PM, Philippe Gerum wrote:
> On 04/12/2012 05:57 PM, Philippe Gerum wrote:
>> On 04/12/2012 05:45 PM, Michael Pustylnik wrote:
>>> The code masking the interrupt in IPIC (call for
>>> ipipe_pre_cascade_noeoi()) initially showed up in the patch you
>>> recommended (see your email attached).
>>>
>>> Later on it was integrated in Xenomai commit
>>> "9a5e42df8bccc59620c08caeb4b9fe92dbf94a1b".
>>>
>>> As shown in the trail below, it keeps interrupts all the time until the
>>> scheduler returns, thus breaking real-time responsiveness.
>>>
>>> A solution to this is probably to remove calling
>>> ipipe_pre_cascade_noeoi() and let the cascading handler mask the
>>> interrupt. Am I missing something? Do you think it is safe to use this
>>> solution?
>>
>> No, as interrupts could be re-enabled before invoking the handler, you 
>> would get an IRQ storm.
>>
>> The solution is to rework the cascaded IRQ handling in the generic 
>> pipeline core, so that all decoded IRQs are acked/masked, then the 
>> multiplex IRQ unmasked, then all the decoded IRQ handlers fired when 
>> syncing the relevant pipeline stage.
>>
>> A fix for this will follow when enough testing will have been done on 
>> arm and ppc, to check whether that logic does not raise other issue.
>>
> 
(Continue reading)

Doug Brunner | 8 May 02:59 2012

Debugging oops in xnheap_init

I just got an oops from running one of my POSIX skin RT applications:

    [183168.735823] BUG: unable to handle kernel paging request at 00700bf5
    [183168.737436] IP: [<c10c091f>] xnheap_init+0x1cf/0x210
    [183168.738604] *pde = 00000000
    [183168.739406] Oops: 0002 [#1] PREEMPT
    [183168.740173] last sysfs file: /sys/devices/virtual/bdi/0:19/uevent
    [183168.740173] Modules linked in: e1000 xeno_rtipc lxfb cfbcopyarea 
cfbimgblt cfbfillrect binfmt_misc psmouse usbhid serio_raw hid ata_piix 
[last unloaded: e1000]
    [183168.740173]
    [183168.740173] Pid: 2557, comm: eve_dal Not tainted 2.6.37 #1 /Bochs
    [183168.740173] EIP: 0060:[<c10c091f>] EFLAGS: 00010246 CPU: 0
    [183168.740173] EIP is at xnheap_init+0x1cf/0x210
    [183168.740173] EAX: 00700bf1 EBX: eed0e210 ECX: eed0e730 EDX: eed0e2fc
    [183168.740173] ESI: 00000000 EDI: 00000000 EBP: eed27da4 ESP: eed27d7c
    [183168.740173]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
    [183168.740173] Process eve_dal (pid: 2557, ti=eed26000 
task=f5773280 task.ti=eed26000)
    [183168.740173] I-pipe domain Linux
    [183168.740173] Stack:
    [183168.740173]  eed0e304 00000030 c157d4a9 eed0e210 eed0e2fc 
eed0e2fc 0000003e 00000000
    [183168.740173]  f85ea000 eed0e210 eed27dc8 c10c0c44 00001000 
00000000 f85aa000 00040000
    [183168.740173]  eed0e200 fffffff4 eed0e210 eed27df0 c10cf198 
eed27de4 c1058b86 eed27f20
    [183168.740173] Call Trace:
    [183168.740173]  [<c10c0c44>] ? xnheap_init_mapped+0xd4/0x210
    [183168.740173]  [<c10cf198>] ? xnshadow_sys_event+0x68/0x210
(Continue reading)

Gilles Chanteperdrix | 8 May 03:24 2012

Re: Debugging oops in xnheap_init

On 05/08/2012 02:59 AM, Doug Brunner wrote:
> I just got an oops from running one of my POSIX skin RT applications:
> 
>     [183168.735823] BUG: unable to handle kernel paging request at 00700bf5
>     [183168.737436] IP: [<c10c091f>] xnheap_init+0x1cf/0x210
>     [183168.738604] *pde = 00000000
>     [183168.739406] Oops: 0002 [#1] PREEMPT
>     [183168.740173] last sysfs file: /sys/devices/virtual/bdi/0:19/uevent
>     [183168.740173] Modules linked in: e1000 xeno_rtipc lxfb cfbcopyarea 
> cfbimgblt cfbfillrect binfmt_misc psmouse usbhid serio_raw hid ata_piix 
> [last unloaded: e1000]
>     [183168.740173]
>     [183168.740173] Pid: 2557, comm: eve_dal Not tainted 2.6.37 #1 /Bochs
>     [183168.740173] EIP: 0060:[<c10c091f>] EFLAGS: 00010246 CPU: 0
>     [183168.740173] EIP is at xnheap_init+0x1cf/0x210
>     [183168.740173] EAX: 00700bf1 EBX: eed0e210 ECX: eed0e730 EDX: eed0e2fc
>     [183168.740173] ESI: 00000000 EDI: 00000000 EBP: eed27da4 ESP: eed27d7c
>     [183168.740173]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>     [183168.740173] Process eve_dal (pid: 2557, ti=eed26000 
> task=f5773280 task.ti=eed26000)
>     [183168.740173] I-pipe domain Linux
>     [183168.740173] Stack:
>     [183168.740173]  eed0e304 00000030 c157d4a9 eed0e210 eed0e2fc 
> eed0e2fc 0000003e 00000000
>     [183168.740173]  f85ea000 eed0e210 eed27dc8 c10c0c44 00001000 
> 00000000 f85aa000 00040000
>     [183168.740173]  eed0e200 fffffff4 eed0e210 eed27df0 c10cf198 
> eed27de4 c1058b86 eed27f20
>     [183168.740173] Call Trace:
>     [183168.740173]  [<c10c0c44>] ? xnheap_init_mapped+0xd4/0x210
(Continue reading)

Vikram Dhillon | 8 May 05:13 2012
Picon

Userland-compile error

Hi all,

I recently compiled and installed a xenomai patched kernel but I am
currently having some issues compiling sample code that came with the
xenomai kernel. So here's what is happening:

=================================================================================================
root <at> zion:/usr/src/xenomai-2.6.0/examples/posix# make
XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
--xeno-cflags is deprecated, use --skin=name --cflags instead
--xeno-ldflags is deprecated, use --skin=name --ldflags instead
gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
-Werror-implicit-function-declaration -pipe -D__XENO__
-I/usr/xenomai/include/posix    -Wl, <at> /usr/xenomai/lib/posix.wrappers
-L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
-rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
/usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
'pthread_cancel <at>  <at> GLIBC_2.0'
/usr/bin/ld: note: 'pthread_cancel <at>  <at> GLIBC_2.0' is defined in DSO
/lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
command line
/lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [satch] Error 1
=================================================================================================

Linker issue here, the program satch in posix directory won't compile,
first change in the posix makefile:
=================================================================================================
CFLAGS=-DCONSUMER $(shell $(XENOCONFIG) --skin=posix --cflags) $(APP_CFLAGS)
(Continue reading)

Gilles Chanteperdrix | 8 May 17:32 2012

Re: Userland-compile error

On 05/08/2012 05:13 AM, Vikram Dhillon wrote:
> Hi all,
> 
> I recently compiled and installed a xenomai patched kernel but I am
> currently having some issues compiling sample code that came with the
> xenomai kernel. So here's what is happening:
> 
> =================================================================================================
> root <at> zion:/usr/src/xenomai-2.6.0/examples/posix# make
> XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
> --xeno-cflags is deprecated, use --skin=name --cflags instead
> --xeno-ldflags is deprecated, use --skin=name --ldflags instead
> gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
> -Werror-implicit-function-declaration -pipe -D__XENO__
> -I/usr/xenomai/include/posix    -Wl, <at> /usr/xenomai/lib/posix.wrappers
> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
> -rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
> /usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
> 'pthread_cancel <at>  <at> GLIBC_2.0'
> /usr/bin/ld: note: 'pthread_cancel <at>  <at> GLIBC_2.0' is defined in DSO
> /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
> command line
> /lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
> make: *** [satch] Error 1
> =================================================================================================

This is a strange error, are you sure you are not mixing a 64 bits
toolchain with 32 bits libraries? Did xenomai compilation run correctly
otherwise? Do xenomai tests run, such as latency for instance?
(Continue reading)

Vikram Dhillon | 8 May 18:23 2012
Picon

Re: Userland-compile error

Hello Gilles,

On Tue, May 8, 2012 at 11:32 AM, Gilles Chanteperdrix
<gilles.chanteperdrix <at> xenomai.org> wrote:
>> =================================================================================================
>> root <at> zion:/usr/src/xenomai-2.6.0/examples/posix# make
>> XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
>> --xeno-cflags is deprecated, use --skin=name --cflags instead
>> --xeno-ldflags is deprecated, use --skin=name --ldflags instead
>> gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
>> -Werror-implicit-function-declaration -pipe -D__XENO__
>> -I/usr/xenomai/include/posix    -Wl, <at> /usr/xenomai/lib/posix.wrappers
>> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
>> -rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
>> /usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
>> 'pthread_cancel <at>  <at> GLIBC_2.0'
>> /usr/bin/ld: note: 'pthread_cancel <at>  <at> GLIBC_2.0' is defined in DSO
>> /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
>> command line
>> /lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
>> collect2: ld returned 1 exit status
>> make: *** [satch] Error 1
>> =================================================================================================
>
> This is a strange error, are you sure you are not mixing a 64 bits
> toolchain with 32 bits libraries? Did xenomai compilation run correctly
> otherwise? Do xenomai tests run, such as latency for instance?
>

Yes, the compile and latency tests actually work just fine, I can
(Continue reading)

Gilles Chanteperdrix | 8 May 19:17 2012

Re: Userland-compile error

On 05/08/2012 06:23 PM, Vikram Dhillon wrote:
> Hello Gilles,
> 
> On Tue, May 8, 2012 at 11:32 AM, Gilles Chanteperdrix
> <gilles.chanteperdrix <at> xenomai.org> wrote:
>>> =================================================================================================
>>> root <at> zion:/usr/src/xenomai-2.6.0/examples/posix# make
>>> XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
>>> --xeno-cflags is deprecated, use --skin=name --cflags instead
>>> --xeno-ldflags is deprecated, use --skin=name --ldflags instead
>>> gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
>>> -Werror-implicit-function-declaration -pipe -D__XENO__
>>> -I/usr/xenomai/include/posix    -Wl, <at> /usr/xenomai/lib/posix.wrappers
>>> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
>>> -rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
>>> /usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
>>> 'pthread_cancel <at>  <at> GLIBC_2.0'
>>> /usr/bin/ld: note: 'pthread_cancel <at>  <at> GLIBC_2.0' is defined in DSO
>>> /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
>>> command line
>>> /lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
>>> collect2: ld returned 1 exit status
>>> make: *** [satch] Error 1
>>> =================================================================================================
>>
>> This is a strange error, are you sure you are not mixing a 64 bits
>> toolchain with 32 bits libraries? Did xenomai compilation run correctly
>> otherwise? Do xenomai tests run, such as latency for instance?
>>
> 
(Continue reading)

Vikram Dhillon | 8 May 19:34 2012
Picon

Re: Userland-compile error

On Tue, May 8, 2012 at 1:17 PM, Gilles Chanteperdrix
<gilles.chanteperdrix <at> xenomai.org> wrote:
> On 05/08/2012 06:23 PM, Vikram Dhillon wrote:
>> Hello Gilles,
>>
>> On Tue, May 8, 2012 at 11:32 AM, Gilles Chanteperdrix
>> <gilles.chanteperdrix <at> xenomai.org> wrote:
>>>> =================================================================================================
>>>> root <at> zion:/usr/src/xenomai-2.6.0/examples/posix# make
>>>> XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
>>>> --xeno-cflags is deprecated, use --skin=name --cflags instead
>>>> --xeno-ldflags is deprecated, use --skin=name --ldflags instead
>>>> gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
>>>> -Werror-implicit-function-declaration -pipe -D__XENO__
>>>> -I/usr/xenomai/include/posix    -Wl, <at> /usr/xenomai/lib/posix.wrappers
>>>> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
>>>> -rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
>>>> /usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
>>>> 'pthread_cancel <at>  <at> GLIBC_2.0'
>>>> /usr/bin/ld: note: 'pthread_cancel <at>  <at> GLIBC_2.0' is defined in DSO
>>>> /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
>>>> command line
>>>> /lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
>>>> collect2: ld returned 1 exit status
>>>> make: *** [satch] Error 1
>>>> =================================================================================================
>>>
>>> This is a strange error, are you sure you are not mixing a 64 bits
>>> toolchain with 32 bits libraries? Did xenomai compilation run correctly
>>> otherwise? Do xenomai tests run, such as latency for instance?
(Continue reading)


Gmane