Qin Lin | 1 May 02:57 2008
Picon

Xenomai booting problem with xilinx xupv2p board


Hi all:

Is anybody can suggest me something to do?

I am a newer in xenomai,last day i port the ELDK_4.2/ppc_4xx/usr/src/linux-2.6.24-xenomai
to xilinx  xupv2p borad with powerpc 405

At the first time, i use xilinx ACE driver, kernel panic on the mouting root file system,
therefore,i try to use NFS file system  as root file system.

fix some problem and patch xilinx EMAC driver and try to booting the kernel ,but the problem still
exist:
................................
[    0.369783] I-pipe: Domain Xenomai registered.
[    0.369910] Xenomai: hal/powerpc started.
[    0.425317] I-pipe: Domain IShield registered.
[    0.431499] Xenomai: real-time nucleus v2.4.2 (One Big Rush) loaded.
[    0.433339] Xenomai: starting native API services.
[    0.433421] Xenomai: starting POSIX services.
[    0.434034] Xenomai: starting RTDM services.
[    0.439588] Installing knfsd (copyright (C) 1996 okir <at> monad.swb.de).
[    0.443437] io scheduler noop registered
[    0.443514] io scheduler anticipatory registered (default)
[    0.443542] io scheduler deadline registered
[    0.443875] io scheduler cfq registered
[    0.573667] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
[    0.587742] serial8250.0: ttyS0 at MMIO 0x40401003 (irq = 3) is a 16550A
[    0.587890] console [ttyS0] enabled
[    0.844872] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[    0.856209] tun: Universal TUN/TAP device driver, 1.6
[    0.861489] tun: (C) 1999-2004 Max Krasnyansky <maxk <at> qualcomm.com>
[    0.871683] xilinx_emac xilinx_emac.0: MAC address is now  2: 0: 0: 0: 0: 0
[    0.878974] XEmac: using fifo mode.
[    0.882898] XEmac: Detected PHY at address 0, ManufID 0x0013, Rev. 0x78e2.
[    0.890084] eth0: Dropping NETIF_F_SG since no checksum feature.
[    0.901061] eth0: Xilinx 10/100 EMAC at 0x40C00000 mapped to 0xD0000000, irq=1
[    0.908649] eth0: XEmac id 1.4a, block id 128, type 1
[    0.915736] mice: PS/2 mouse device common for all mice
[    0.921858] TCP cubic registered
[    0.925705] NET: Registered protocol family 1
[    0.930433] NET: Registered protocol family 17
[    0.936684] RPC: Registered udp transport module.
[    0.941668] RPC: Registered tcp transport module.
[    3.557536] Oops: kernel access of bad area, sig: 11 [#1]
[    3.562997] NIP: 00000000 LR: c0009a34 CTR: 00000000
[    3.567977] REGS: c02a5dc0 TRAP: 0400   Not tainted  (2.6.24.2)
[    3.573895] MSR: 00021030 <ME,IR,DR>  CR: 24004028  XER: 00000000
[    3.580104] TASK = c0287528[0] 'swapper' THREAD: c02a4000
[    3.585333] GPR00: 00000000 c02a5e70 c0287528 00000001 c028cc8c 00000000 ce9ff16e 00000002
[    3.593851] GPR08: 00000000 c028cc48 00000002 c028d7dc 00000008 00000000 10000800 00000000
[    3.602359] GPR16: 00000001 ffffffff 007fff00 0fff9e08 00000000 0ffbd958 00000001 0ffff004
[    3.610886] GPR24: 007ffe80 00800000 c02d3c60 00000020 c02d0ee4 00000000 00000001 c02d3bc0
[    3.619603] NIP [00000000] 0x0
[    3.622699] LR [c0009a34] __ipipe_ack_irq+0x28/0x3c
[    3.627673] Call Trace:
[    3.630135] [c02a5e80] [c0009d14] __ipipe_handle_irq+0xe4/0x13c
[    3.636108] [c02a5ea0] [c0009eec] __ipipe_grab_irq+0x3c/0x94
[    3.641819] [c02a5ec0] [c00035a8] __ipipe_ret_from_except+0x0/0xc
[    3.647979] [c02a5f80] [20000000] 0x20000000
[    3.652298] [c02a5fa0] [c00095f0] cpu_idle+0x50/0xe8
[    3.657326] [c02a5fb0] [c0222cd8] rest_init+0x50/0x60
[    3.662493] [c02a5fc0] [c02a69e8] start_kernel+0x2a8/0x2bc
[    3.668064] [c02a5ff0] [c000225c] start_here+0x44/0xb0
...............................

if i unselect xenomai and ipipe in the kernel config ,booting OK!
[    0.000000] Xilinx INTC #0 at 0x41200000 mapped to 0xFDFFE000
[    0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes)
[    0.000350] Console: colour dummy device 80x25
[    0.004749] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.011265] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.131469] Memory: 251136k available (1920k kernel code, 592k data, 108k init, 0k highmem)
[    0.153872] Mount-cache hash table entries: 512
[    0.163682] net_namespace: 64 bytes
[    0.170470] NET: Registered protocol family 16
[    0.234369] NET: Registered protocol family 2
[    0.245332] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.249286] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.251485] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.252649] TCP: Hash tables configured (established 8192 bind 8192)
[    0.252707] TCP reno registered
[    0.270778] Installing knfsd (copyright (C) 1996 okir <at> monad.swb.de).
[    0.274747] io scheduler noop registered
[    0.274827] io scheduler anticipatory registered (default)
[    0.274860] io scheduler deadline registered
[    0.275379] io scheduler cfq registered
[    0.408440] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
[    0.422954] serial8250.0: ttyS0 at MMIO 0x40401003 (irq = 3) is a 16550A
[    0.423304] console [ttyS0] enabled
[    0.646932] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[    0.658492] tun: Universal TUN/TAP device driver, 1.6
[    0.663891] tun: (C) 1999-2004 Max Krasnyansky <maxk <at> qualcomm.com>
[    0.674245] xilinx_emac xilinx_emac.0: MAC address is now  2: 0: 0: 0: 0: 0
[    0.681489] XEmac: using fifo mode.
[    0.685449] XEmac: Detected PHY at address 0, ManufID 0x0013, Rev. 0x78e2.
[    0.692764] eth0: Dropping NETIF_F_SG since no checksum feature.
[    0.703788] eth0: Xilinx 10/100 EMAC at 0x40C00000 mapped to 0xD0000000, irq=1
[    0.711321] eth0: XEmac id 1.4a, block id 128, type 1
[    0.718483] mice: PS/2 mouse device common for all mice
[    0.724481] TCP cubic registered
[    0.728219] NET: Registered protocol family 1
[    0.733102] NET: Registered protocol family 17
[    0.739523] RPC: Registered udp transport module.
[    0.744589] RPC: Registered tcp transport module.
[    4.269751] IP-Config: Guessing netmask 255.255.255.0
[    4.275710] IP-Config: Complete:
[    4.278968]       device=eth0, addr=192.168.26.127, mask=255.255.255.0, gw=255.255.255.255,
[    4.287826]      host=192.168.26.127, domain=, nis-domain=(none),
[    4.294161]      bootserver=255.255.255.255, rootserver=192.168.26.21, rootpath=
[    4.304345] Looking up port of RPC 100003/2 on 192.168.26.21
[    4.314376] Looking up port of RPC 100005/1 on 192.168.26.21
[    4.355572] VFS: Mounted root (nfs filesystem).
[    4.361014] Freeing unused kernel memory: 108k init



--
Everyday is a new day!

Regards,

Qin Lin
_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help
Hans Søndergaard (HSO | 1 May 07:46 2008
Picon

Re: Xenomai on AT91SAM9260

Hi,

Thanks for the answer.
We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91SAM9260,
but have a problem:

Is it possible to disable the building of the posix skin when
configuring the user space libraries for Xenomai?

I have tried --disable-posix-skin, but this had no effect.

The reason why I ask is that the building of src/skins/posix/init.c
fails like this:

[stk <at> dhcppc6 posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../../src/inc
lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_REENTRANT
-Wall -pipe -march=armv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I../../..
/../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -MT libpthre
ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../../../xeno
mai-2.4.3/src/skins/posix/init.c  -fPIC -DPIC -o .libs/libpthread_rt_la-init.o
In file included from ../../../src/include/asm/xenomai/atomic.h:78,
                 from ../../../../xenomai-2.4.3/include/nucleus/system.h:27,
                 from ../../../src/include/asm/xenomai/system.h:135,
                 from ../../../../xenomai-2.4.3/include/nucleus/types.h:40,
                 from ../../../../xenomai-2.4.3/include/nucleus/queue.h:25,
                 from ../../../../xenomai-2.4.3/include/nucleus/timebase.h:30,
                 from ../../../../xenomai-2.4.3/include/nucleus/timer.h:27,
                 from ../../../../xenomai-2.4.3/include/nucleus/thread.h:26,
                 from ../../../../xenomai-2.4.3/include/posix/pthread.h:150,
                 from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
-ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
de/bits/uClibc_mutex.h:16,
                 from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
-ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
de/bits/uClibc_stdio.h:120,
                 from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
-ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
de/stdio.h:73,
                 from ../../../../xenomai-2.4.3/src/skins/posix/init.c:20:
../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_features_check
':
../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclared (firs
t use in this function)
../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared identifi
er is reported only once
../../../src/include/asm/xenomai/syscall.h:295: error: for each function it appe
ars in.)

Obviously there is something wrong with the include path used:
uClibc_mutex.h should not include 'pthread.h' in the Xenomai
distribution but rather the version in uClibc itself.

Why this happens I'm trying to discover.

The complete configure I'm using is:

../xenomai-2.4.3/configure --build=i686-pc-linux-gnu --host=arm-linux-uclibc
--enable-arm-mach=at91sam926x --enable-arm-tsc

Thanks in advance.

Hans

-----Original Message-----
From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix <at> gmail.com]
Sent: 29. april 2008 14:18
To: Hans Søndergaard (HSO)
Cc: xenomai-help <at> gna.org
Subject: Re: [Xenomai-help] Xenomai on AT91SAM9260

On Tue, Apr 29, 2008 at 1:37 PM, Hans Søndergaard (HSO) <HSO <at> viauc.dk> wrote:
>
>
>
>
> Is it possible to install Xenomai 2.4.3 together with Linux 2.6.23 on
> AT91SAM9260?
>
> If the answer is no, which combination of Xenomai and Linux would you
> recommend?

Xenomai 2.4.3 ships with two versions of the Adeos I-pipe patch: one
for Linux 2.6.20, the other for Linux 2.6.24. So, I would recommend
using one of these two versions. Of course, you can probably adapt one
of the patches to Linux 2.6.23, but that may not be obvious.

Note that you may decide to apply the AT91 patch, the I-pipe patch
should apply cleanly with or without the AT91 patch.

--
 Gilles
Gilles Chanteperdrix | 1 May 18:04 2008
Picon

Re: Xenomai on AT91SAM9260

Hans Søndergaard (HSO) wrote:
 > Hi,
 > 
 > Thanks for the answer.
 > We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91SAM9260,
 > but have a problem:
 > 
 > Is it possible to disable the building of the posix skin when
 > configuring the user space libraries for Xenomai?
 > 
 > I have tried --disable-posix-skin, but this had no effect.
 > 
 > The reason why I ask is that the building of src/skins/posix/init.c
 > fails like this:
 > 
 > [stk <at> dhcppc6 posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../../src/inc
 > lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_REENTRANT
 > -Wall -pipe -march=armv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I../../..
 > /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -MT libpthre
 > ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../../../xeno
 > mai-2.4.3/src/skins/posix/init.c  -fPIC -DPIC -o .libs/libpthread_rt_la-init.o
 > In file included from ../../../src/include/asm/xenomai/atomic.h:78,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/system.h:27,
 >                  from ../../../src/include/asm/xenomai/system.h:135,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/types.h:40,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/queue.h:25,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/timebase.h:30,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/timer.h:27,
 >                  from ../../../../xenomai-2.4.3/include/nucleus/thread.h:26,
 >                  from ../../../../xenomai-2.4.3/include/posix/pthread.h:150,
 >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
 > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
 > de/bits/uClibc_mutex.h:16,
 >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
 > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
 > de/bits/uClibc_stdio.h:120,
 >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
 > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
 > de/stdio.h:73,
 >                  from ../../../../xenomai-2.4.3/src/skins/posix/init.c:20:
 > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_features_check
 > ':
 > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclared (firs
 > t use in this function)
 > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared identifi
 > er is reported only once
 > ../../../src/include/asm/xenomai/syscall.h:295: error: for each function it appe
 > ars in.)
 > 
 > Obviously there is something wrong with the include path used:
 > uClibc_mutex.h should not include 'pthread.h' in the Xenomai
 > distribution but rather the version in uClibc itself.
 > 
 > Why this happens I'm trying to discover.
 > 
 > The complete configure I'm using is:
 > 
 > ../xenomai-2.4.3/configure --build=i686-pc-linux-gnu --host=arm-linux-uclibc
--enable-arm-mach=at91sam926x --enable-arm-tsc
 > 
 > Thanks in advance.

Well, I understand that it may not be important to you if you do not
intend to use the posix skin, but we should try and solve this issue
(which seems to be a uclibc issue). Including posix skin pthread.h
instead of libc pthread.h should be no problem, since posix skin
pthread.h include the libc pthread.h. The problem here is due to the
fact that asm-arm/syscall.h is trying to use stderr whereas we are at
the very beginning of stdio.h where stderr is not defined yet.

I have to admit that I have no idea here other than defining a function
in init.c which calls fprintf and to call this function instead of
fprintf in asm-arm/syscall.h

Philippe, any better idea ?

--

-- 

					    Gilles.
Gilles Chanteperdrix | 1 May 18:55 2008
Picon

Re: Xenomai on AT91SAM9260

Hans Søndergaard (HSO) wrote:
 >                  from ../../../../xenomai-2.4.3/src/skins/posix/init.c:20:
 > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_features_check
 > ':
 > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclared (firs
 > t use in this function)
 > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared identifi
 > er is reported only once
 > ../../../src/include/asm/xenomai/syscall.h:295: error: for each function it appe
 > ars in.)
 > 
 > Obviously there is something wrong with the include path used:
 > uClibc_mutex.h should not include 'pthread.h' in the Xenomai
 > distribution but rather the version in uClibc itself.
 > 
 > Why this happens I'm trying to discover.
 > 
 > The complete configure I'm using is:
 > 
 > ../xenomai-2.4.3/configure --build=i686-pc-linux-gnu --host=arm-linux-uclibc
--enable-arm-mach=at91sam926x --enable-arm-tsc

The way I see it, the problem is that posix/pthread.h includes
nucleus/thread.h and nucleus/intr.h to get a few constants
definitions. And since these include files include other include files,
we end up with the whole stack of xenomai includes. So, I propose the
following patch which basically stop including other include files in
nucleus/thread.h and nucleus/intr.h when included from user-space. The
only downside of this solution is that application like cyclictest who
want to use the I-pipe tracer now need to include explicitely
nucleus/trace.h.

-- 

					    Gilles.
Index: include/nucleus/thread.h
===================================================================
--- include/nucleus/thread.h	(revision 3732)
+++ include/nucleus/thread.h	(working copy)
 <at>  <at>  -22,8 +22,6  <at>  <at> 
 #ifndef _XENO_NUCLEUS_THREAD_H
 #define _XENO_NUCLEUS_THREAD_H

-#include <nucleus/timer.h>
-
 /*!  <at> ingroup nucleus 
    <at> defgroup nucleus_state_flags Thread state flags.
    <at> brief Bits reporting permanent or transient states of thread.
 <at>  <at>  -130,6 +128,7  <at>  <at> 
 #if defined(__KERNEL__) || defined(__XENO_SIM__)

 #include <nucleus/stat.h>
+#include <nucleus/timer.h>

 #ifdef __XENO_SIM__
 /* Pseudo-status (must not conflict with other bits) */
Index: include/nucleus/intr.h
===================================================================
--- include/nucleus/intr.h	(revision 3732)
+++ include/nucleus/intr.h	(working copy)
 <at>  <at>  -22,8 +22,6  <at>  <at> 
 #ifndef _XENO_NUCLEUS_INTR_H
 #define _XENO_NUCLEUS_INTR_H

-#include <nucleus/types.h>
-
 /* Possible return values of ISR. */
 #define XN_ISR_NONE   	 0x1
 #define XN_ISR_HANDLED	 0x2
 <at>  <at>  -41,6 +39,7  <at>  <at> 

 #if defined(__KERNEL__) || defined(__XENO_SIM__)

+#include <nucleus/types.h>
 #include <nucleus/stat.h>

 typedef struct xnintr {
Index: src/skins/posix/rtdm.c
===================================================================
--- src/skins/posix/rtdm.c	(revision 3732)
+++ src/skins/posix/rtdm.c	(working copy)
 <at>  <at>  -18,6 +18,7  <at>  <at> 
  */

 #include <errno.h>
+#include <string.h>
 #include <stdarg.h>
 #include <pthread.h>
 #include <fcntl.h>
Index: src/skins/posix/thread.c
===================================================================
--- src/skins/posix/thread.c	(revision 3732)
+++ src/skins/posix/thread.c	(working copy)
 <at>  <at>  -17,6 +17,7  <at>  <at> 
  */

 #include <stddef.h>
+#include <string.h>
 #include <errno.h>
 #include <signal.h>
 #include <unistd.h>
Index: src/skins/posix/clock.c
===================================================================
--- src/skins/posix/clock.c	(revision 3732)
+++ src/skins/posix/clock.c	(working copy)
 <at>  <at>  -18,6 +18,7  <at>  <at> 

 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <pthread.h>		/* For pthread_setcanceltype. */
 #include <posix/syscall.h>
Index: src/testsuite/cyclic/cyclictest.c
===================================================================
--- src/testsuite/cyclic/cyclictest.c	(revision 3732)
+++ src/testsuite/cyclic/cyclictest.c	(working copy)
 <at>  <at>  -35,6 +35,7  <at>  <at> 
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/mman.h>
+#include <nucleus/trace.h>

 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))

_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help
Philippe Gerum | 1 May 19:02 2008

Re: Xenomai on AT91SAM9260

Gilles Chanteperdrix wrote:
> Hans Søndergaard (HSO) wrote:
>  > Hi,
>  > 
>  > Thanks for the answer.
>  > We are now trying to install Xenomai 2.4.3 using Linux 2.6.24 on AT91SAM9260,
>  > but have a problem:
>  > 
>  > Is it possible to disable the building of the posix skin when
>  > configuring the user space libraries for Xenomai?
>  > 
>  > I have tried --disable-posix-skin, but this had no effect.
>  > 
>  > The reason why I ask is that the building of src/skins/posix/init.c
>  > fails like this:
>  > 
>  > [stk <at> dhcppc6 posix]$ arm-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../../src/inc
>  > lude -I../../../../xenomai-2.4.3/src/skins/posix -O2 -D_GNU_SOURCE -D_REENTRANT
>  > -Wall -pipe -march=armv5 -D__XENO__ -D__IN_XENO__ -Wstrict-prototypes -I../../..
>  > /../xenomai-2.4.3/include -I../../../../xenomai-2.4.3/include/posix -MT libpthre
>  > ad_rt_la-init.lo -MD -MP -MF .deps/libpthread_rt_la-init.Tpo -c ../../../../xeno
>  > mai-2.4.3/src/skins/posix/init.c  -fPIC -DPIC -o .libs/libpthread_rt_la-init.o
>  > In file included from ../../../src/include/asm/xenomai/atomic.h:78,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/system.h:27,
>  >                  from ../../../src/include/asm/xenomai/system.h:135,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/types.h:40,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/queue.h:25,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/timebase.h:30,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/timer.h:27,
>  >                  from ../../../../xenomai-2.4.3/include/nucleus/thread.h:26,
>  >                  from ../../../../xenomai-2.4.3/include/posix/pthread.h:150,
>  >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
>  > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
>  > de/bits/uClibc_mutex.h:16,
>  >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
>  > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
>  > de/bits/uClibc_stdio.h:120,
>  >                  from /home/stk/brick/mb9200/buildroot/build_arm/staging_dir/bin
>  > -ccache/../lib/gcc/arm-linux-uclibc/4.1.1/../../../../arm-linux-uclibc/sys-inclu
>  > de/stdio.h:73,
>  >                  from ../../../../xenomai-2.4.3/src/skins/posix/init.c:20:
>  > ../../../src/include/asm/xenomai/syscall.h: In function 'xeno_arm_features_check
>  > ':
>  > ../../../src/include/asm/xenomai/syscall.h:295: error: 'stderr' undeclared (firs
>  > t use in this function)
>  > ../../../src/include/asm/xenomai/syscall.h:295: error: (Each undeclared identifi
>  > er is reported only once
>  > ../../../src/include/asm/xenomai/syscall.h:295: error: for each function it appe
>  > ars in.)
>  > 
>  > Obviously there is something wrong with the include path used:
>  > uClibc_mutex.h should not include 'pthread.h' in the Xenomai
>  > distribution but rather the version in uClibc itself.
>  > 
>  > Why this happens I'm trying to discover.
>  > 
>  > The complete configure I'm using is:
>  > 
>  > ../xenomai-2.4.3/configure --build=i686-pc-linux-gnu --host=arm-linux-uclibc
--enable-arm-mach=at91sam926x --enable-arm-tsc
>  > 
>  > Thanks in advance.
> 
> Well, I understand that it may not be important to you if you do not
> intend to use the posix skin, but we should try and solve this issue
> (which seems to be a uclibc issue). Including posix skin pthread.h
> instead of libc pthread.h should be no problem, since posix skin
> pthread.h include the libc pthread.h. The problem here is due to the
> fact that asm-arm/syscall.h is trying to use stderr whereas we are at
> the very beginning of stdio.h where stderr is not defined yet.
> 
> I have to admit that I have no idea here other than defining a function
> in init.c which calls fprintf and to call this function instead of
> fprintf in asm-arm/syscall.h
> 
> Philippe, any better idea ?
> 

No, but I do have an almost as ugly one to suggest:

--- include/asm-arm/syscall.h	(revision 3729)
+++ include/asm-arm/syscall.h	(working copy)
 <at>  <at>  -222,7 +222,6  <at>  <at> 
 #define XENOMAI_SYSARCH_TSCINFO                 4

 #ifndef __KERNEL__
-#include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 <at>  <at>  -230,6 +229,8  <at>  <at> 
 #include <fcntl.h>
 #include <unistd.h>
 #include <limits.h>
+#include <error.h>
+#include <errno.h>

 __attribute__((weak)) struct __xn_tscinfo __xn_tscinfo = {
 	type: -1
 <at>  <at>  -291,17 +292,15  <at>  <at> 
 	err = XENOMAI_SYSCALL2(__xn_sys_arch,
 			       XENOMAI_SYSARCH_TSCINFO, &__xn_tscinfo);
 	if (err) {
-	  error:
-		fprintf(stderr, "Xenomai: Your board/configuration does not"
-			" allow tsc emulation in user-space: %d\n", err);
-		exit(EXIT_FAILURE);
+	  fail:
+		error(EXIT_FAILURE, err,
+		      "Xenomai: Your board/configuration does not"
+		      " allow tsc emulation in user-space\n");
 	}

 	fd = open("/dev/mem", O_RDONLY | O_SYNC);
-	if (fd == -1) {
-		perror("Xenomai init: open(/dev/mem)");
-		exit(EXIT_FAILURE);
-	}
+	if (fd == -1)
+		error(EXIT_FAILURE, errno, "Xenomai init: open(/dev/mem)");

 	page_size = sysconf(_SC_PAGESIZE);

 <at>  <at>  -313,10 +312,8  <at>  <at> 
 		phys_addr = (unsigned long) __xn_tscinfo.u.fr.counter;
 		addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED,
 			    fd, phys_addr & ~(page_size - 1));
-		if (addr == MAP_FAILED) {
-			perror("Xenomai init: mmap(/dev/mem)");
-			exit(EXIT_FAILURE);
-		}
+		if (addr == MAP_FAILED)
+			error(EXIT_FAILURE, errno, "Xenomai init: mmap(/dev/mem)");

 		__xn_tscinfo.u.fr.counter =
 			((volatile unsigned *)
 <at>  <at>  -330,10 +327,8  <at>  <at> 
 		phys_addr = (unsigned long) __xn_tscinfo.u.dec.counter;
 		addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED,
 			    fd, phys_addr & ~(page_size - 1));
-		if (addr == MAP_FAILED) {
-			perror("Xenomai init: mmap(/dev/mem)");
-			exit(EXIT_FAILURE);
-		}
+		if (addr == MAP_FAILED)
+			error(EXIT_FAILURE, "Xenomai init: mmap(/dev/mem)");

 		__xn_tscinfo.u.dec.counter =
 			((volatile unsigned *)
 <at>  <at>  -342,18 +337,15  <at>  <at> 
 	}
 #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC == __XN_TSC_TYPE_DECREMENTER */
 	case __XN_TSC_TYPE_NONE:
-		goto error;
+		goto fail;
 		
 	default:
-		fprintf(stderr,
-			"Xenomai: kernel/user tsc emulation mismatch.\n");
-		exit(EXIT_FAILURE);
+		error(EXIT_FAILURE, err,
+		      "Xenomai: kernel/user tsc emulation mismatch.\n");
 	}

-	if (close(fd)) {
-		perror("Xenomai init: close(/dev/mem)");
-		exit(EXIT_FAILURE);
-	}
+	if (close(fd))
+		error(EXIT_FAILURE, errno, "Xenomai init: close(/dev/mem)");
 #endif /* CONFIG_XENO_ARM_HW_DIRECT_TSC */
 }
 #define xeno_arch_features_check() xeno_arm_features_check()

--

-- 
Philippe.
jeff koftinoff | 2 May 07:29 2008

MSI Interrupt Crash


Hi all,
 
I am currently writing an rtdm driver for an fpga card.
I am using the latest Xenomai version from the svn repository and kernel version 2.6.24.5.
This runs on a Core2Duo with a debian 64 bit version.
The driver seems to work fine as long as I use legacy interrupts and not MSI's.


As soon as I use pci_enable_msi before rtdm_irq_request I get:
 
[ 4260.359093] fpga_driver :MSI Enabled
[ 4260.359095] fpga_driver :IORESOURCE_IRQ IRQ: 248
[ 4260.359109] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
[ 4260.359113]  [<0000000000000000>]
[ 4260.359117] PGD 3b1f7067 PUD 3b1f6067 PMD 0
[ 4260.359121] Oops: 0010 [1] SMP
[ 4260.359125] CPU 1
[ 4260.359127] Modules linked in: fpga_module(P) af_packet binfmt_misc rfcomm l2cap bluetooth ppdev ipv6 sbs container dock video output sbshc battery iptable_filter ip_tables x_tables ac coretemp max6650 sbp2 parport_pc lp parport atl1 mii i2c_core psmouse serio_raw button shpchp iTCO_wdt iTCO_vendor_support intel_agp pci_hotplug evdev pcspkr ext3 jbd mbcache sg sr_mod cdrom ata_generic sd_mod pata_acpi usbhid hid ohci1394 ieee1394 ahci pata_jmicron libata scsi_mod ehci_hcd uhci_hcd usbcore dm_mirror dm_snapshot dm_mod fan fuse
[ 4260.359179] Pid: 7016, comm: insmod Tainted: P        2.6.24.5 #1
[ 4260.359181] RIP: 0010:[<0000000000000000>]  [<0000000000000000>]
[ 4260.359185] RSP: 0000:ffff81003b23dc80  EFLAGS: 00010246
[ 4260.359187] RAX: ffffffff805dc2c0 RBX: 0000000000000000 RCX: ffff810001018780
[ 4260.359189] RDX: ffff81008099a000 RSI: 0000000000000000 RDI: 00000000000000f8
[ 4260.359192] RBP: ffffffff882cc688 R08: 0000000000000000 R09: 00000000000000c1
[ 4260.359194] R10: 0000000000000000 R11: 0000000000000000 R12: ffff81003ee87800
[ 4260.359196] R13: ffffffff882cbee0 R14: 0000000000000000 R15: 000000000000000f
[ 4260.359198] FS:  00002b43257436e0(0000) GS:ffff81003ec01700(0000) knlGS:0000000000000000
[ 4260.359200] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4260.359202] CR2: 0000000000000000 CR3: 0000000032168000 CR4: 00000000000006e0
[ 4260.359204] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4260.359206] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 4260.359209] Process insmod (pid: 7016, threadinfo ffff81003b23c000, task ffff810032166fc0)
[ 4260.359210] Stack:  ffffffff8041e0ff ffff81003ee87800 ffffffff802c8a58 ffff81003ee87800
[ 4260.359216]  ffff81003ee87800 ffff81003ee87800 ffffffff882ca374 0000000000000000
[ 4260.359221]  ffffffff882ca521 0000000000000001 ffff81003ee87870 ffffffff882cc1a0
[ 4260.359225] Call Trace:
[ 4260.359231]  [<ffffffff8041e0ff>] rthal_irq_enable+0x2f/0x40
[ 4260.359236]  [<ffffffff802c8a58>] rtdm_irq_request+0x48/0x60
[ 4260.359242]  [<ffffffff882ca374>] :fpga_module:pci_request_resources+0x104/0x1d0
[ 4260.359246]  [<ffffffff882ca521>] :fpga_module:pci_probe+0xe1/0x180
[ 4260.359250]  [<ffffffff8039ec88>] pci_device_probe+0xf8/0x170
[ 4260.359256]  [<ffffffff8040069c>] driver_probe_device+0x9c/0x1b0
[ 4260.359259]  [<ffffffff80400969>] __driver_attach+0xc9/0xd0
[ 4260.359262]  [<ffffffff804008a0>] __driver_attach+0x0/0xd0
[ 4260.359265]  [<ffffffff803ff8dd>] bus_for_each_dev+0x4d/0x80
[ 4260.359270]  [<ffffffff803ffcec>] bus_add_driver+0xac/0x220
[ 4260.359274]  [<ffffffff8039ef09>] __pci_register_driver+0x69/0xb0
[ 4260.359280]  [<ffffffff88069037>] :fpga_module:card_init+0x37/0x64
[ 4260.359284]  [<ffffffff802657be>] sys_init_module+0x18e/0x1a90
[ 4260.359293]  [<ffffffff80389b28>] _atomic_dec_and_lock+0x48/0x70
[ 4260.359298]  [<ffffffff80253330>] param_get_int+0x0/0x20
[ 4260.359304]  [<ffffffff8020c3f2>] system_call+0x92/0x97
[ 4260.359308]
[ 4260.359310]
[ 4260.359310] Code:  Bad RIP value.
[ 4260.359313] RIP  [<0000000000000000>]
[ 4260.359315]  RSP <ffff81003b23dc80>
[ 4260.359316] CR2: 0000000000000000
[ 4260.359325] ---[ end trace 502b14894d3ed93b ]---
 
Any advice?

Jeff and Thomas


_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help
kerhoas.vincent | 2 May 09:35 2008
Picon

problem patching xenomai with arm





Hello

I'm trying to patch a linux kernel 2.6.8 or 2.15 with the following command :

sudo scripts/prepare-kernel.sh --arch=arm
\--adeos=/usr/src/adeos-ipipe-2.6.24-arm-1.9-01.patch
\--linux=/usr/src/linux-2.6.8.1


and I've got an error for both of them.

So :

Is Xenomai realy working for ARM ?
The patch is ok with those version of linux (I've got an error with the
other ARM patches given with xenomai 2.4.3) ?
I'm working with ubuntu 7.10 ; maybe I've got to install other files ?

another detail : my target is a cirrus logic ep9302 ; I've understood that it was possible to put RTAI on it, may I suppose that I can put xenomai too ?

Vincent


________________________________________________________________________________________________

Hunk #2 FAILED at 196.
Hunk #3 FAILED at 262.
Hunk #4 FAILED at 292.
Hunk #5 FAILED at 323.
4 out of 5 hunks FAILED -- saving rejects to file
arch/arm/mach-integrator/core.c.rej
patching file arch/arm/mach-integrator/integrator_cp.c
Hunk #2 FAILED at 20.
Hunk #3 succeeded at 172 (offset -52 lines).
Hunk #4 FAILED at 543.
2 out of 4 hunks FAILED -- saving rejects to file
arch/arm/mach-integrator/integrator_cp.c.rej
patching file arch/arm/mach-ixp4xx/common.c
Hunk #1 succeeded at 39 with fuzz 2 (offset -6 lines).
Hunk #2 succeeded at 305 with fuzz 2 (offset -24 lines).
Hunk #3 succeeded at 317 with fuzz 2 (offset -39 lines).
Hunk #4 FAILED at 501.
Hunk #5 FAILED at 530.
2 out of 5 hunks FAILED -- saving rejects to file
arch/arm/mach-ixp4xx/common.c.rej
patching file arch/arm/mach-pxa/irq.c
Hunk #1 succeeded at 172 (offset -76 lines).
patching file arch/arm/mach-pxa/leds-idp.c
Hunk #1 succeeded at 14 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-pxa/leds-lubbock.c
Hunk #1 succeeded at 13 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-pxa/leds-mainstone.c
Hunk #1 succeeded at 12 with fuzz 2 (offset 1 line).
can't find file to patch at input line 3028
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mach-pxa/leds-trizeps4.c
b/arch/arm/mach-pxa/leds-trizeps4.c
|index 2271d20..614f391 100644
|--- a/arch/arm/mach-pxa/leds-trizeps4.c
|+++ b/arch/arm/mach-pxa/leds-trizeps4.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file arch/arm/mach-pxa/time.c
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 119.
Hunk #3 FAILED at 156.
Hunk #4 FAILED at 199.
Hunk #5 FAILED at 236.
Hunk #6 FAILED at 292.
Hunk #7 FAILED at 332.
Hunk #8 FAILED at 344.
8 out of 8 hunks FAILED -- saving rejects to file
arch/arm/mach-pxa/time.c.rej
can't find file to patch at input line 3255
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c
|index a87608b..3fa7ceb 100644
|--- a/arch/arm/mach-s3c2440/irq.c
|+++ b/arch/arm/mach-s3c2440/irq.c
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
patching file arch/arm/mach-sa1100/irq.c
Hunk #1 succeeded at 14 with fuzz 2 (offset -1 lines).
patching file arch/arm/mach-sa1100/leds-assabet.c
Hunk #1 succeeded at 11 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-badge4.c
Hunk #1 succeeded at 12 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-cerf.c
Hunk #1 succeeded at 5 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-hackkit.c
Hunk #1 succeeded at 11 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-lart.c
Hunk #1 succeeded at 11 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/leds-simpad.c
Hunk #1 succeeded at 5 with fuzz 2 (offset 1 line).
patching file arch/arm/mach-sa1100/time.c
Hunk #1 succeeded at 13 with fuzz 1 (offset -1 lines).
Hunk #2 succeeded at 40 with fuzz 2 (offset 18 lines).
Hunk #3 succeeded at 111 (offset 18 lines).
Hunk #4 FAILED at 157.
Hunk #5 FAILED at 200.
Hunk #6 FAILED at 293.
3 out of 6 hunks FAILED -- saving rejects to file
arch/arm/mach-sa1100/time.c.rej
patching file arch/arm/mm/alignment.c
Hunk #1 succeeded at 457 with fuzz 2 (offset -169 lines).
can't find file to patch at input line 3643
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
|index ded0e96..bb79f37 100644
|--- a/arch/arm/mm/copypage-v4mc.c
|+++ b/arch/arm/mm/copypage-v4mc.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 3665
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
|index 2e455f8..accf6ed 100644
|--- a/arch/arm/mm/copypage-xscale.c
|+++ b/arch/arm/mm/copypage-xscale.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
patching file arch/arm/mm/fault.c
Hunk #1 succeeded at 221 with fuzz 2 (offset -1 lines).
Hunk #2 succeeded at 329 (offset 4 lines).
Hunk #3 FAILED at 367.
Hunk #4 succeeded at 384 (offset 7 lines).
Hunk #5 succeeded at 460 with fuzz 1 (offset 5 lines).
Hunk #6 succeeded at 476 (offset 2 lines).
1 out of 6 hunks FAILED -- saving rejects to file arch/arm/mm/fault.c.rej
can't find file to patch at input line 3785
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
|index 50b9aed..1a90ca7 100644
|--- a/arch/arm/mm/pgd.c
|+++ b/arch/arm/mm/pgd.c
--------------------------
No file to patch.  Skipping patch.
5 out of 5 hunks ignored
can't find file to patch at input line 3868
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
|index 8fbc884..adcd837 100644
|--- a/arch/arm/plat-s3c24xx/irq.c
|+++ b/arch/arm/plat-s3c24xx/irq.c
--------------------------
No file to patch.  Skipping patch.
4 out of 4 hunks ignored
can't find file to patch at input line 4023
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/plat-s3c24xx/s3c244x-irq.c
b/arch/arm/plat-s3c24xx/s3c244x-irq.c
|index 2dbb260..e4ae071 100644
|--- a/arch/arm/plat-s3c24xx/s3c244x-irq.c
|+++ b/arch/arm/plat-s3c24xx/s3c244x-irq.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 4058
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c
|index 2ec1daa..4f6a358 100644
|--- a/arch/arm/plat-s3c24xx/time.c
|+++ b/arch/arm/plat-s3c24xx/time.c
--------------------------
No file to patch.  Skipping patch.
13 out of 13 hunks ignored
can't find file to patch at input line 4386
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
|index 279c940..daabf90 100644
|--- a/drivers/pci/htirq.c
|+++ b/drivers/pci/htirq.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 4399
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-at91/hardware.h
b/include/asm-arm/arch-at91/hardware.h
|index 8f1cdd3..2c1be7b 100644
|--- a/include/asm-arm/arch-at91/hardware.h
|+++ b/include/asm-arm/arch-at91/hardware.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 4429
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-at91/irqs.h
b/include/asm-arm/arch-at91/irqs.h
|index 70b1216..8ecf341 100644
|--- a/include/asm-arm/arch-at91/irqs.h
|+++ b/include/asm-arm/arch-at91/irqs.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 4469
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-at91/timex.h
b/include/asm-arm/arch-at91/timex.h
|index a310698..cb674fe 100644
|--- a/include/asm-arm/arch-at91/timex.h
|+++ b/include/asm-arm/arch-at91/timex.h
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 4496
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-imx/imx-regs.h
b/include/asm-arm/arch-imx/imx-regs.h
|index fb9de27..724694c 100644
|--- a/include/asm-arm/arch-imx/imx-regs.h
|+++ b/include/asm-arm/arch-imx/imx-regs.h
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 4526
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-imx/irqs.h
b/include/asm-arm/arch-imx/irqs.h
|index f195542..799ae66 100644
|--- a/include/asm-arm/arch-imx/irqs.h
|+++ b/include/asm-arm/arch-imx/irqs.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 4548
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/arch-integrator/entry-macro.S
b/include/asm-arm/arch-integrator/entry-macro.S
|index 491af1a..495262b 100644
|--- a/include/asm-arm/arch-integrator/entry-macro.S
|+++ b/include/asm-arm/arch-integrator/entry-macro.S
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file include/asm-arm/arch-integrator/irqs.h
patching file include/asm-arm/arch-integrator/platform.h
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 436.
Hunk #3 succeeded at 445 with fuzz 2 (offset -4 lines).
2 out of 3 hunks FAILED -- saving rejects to file
include/asm-arm/arch-integrator/platform.h.rej
patching file include/asm-arm/arch-integrator/timex.h
patching file include/asm-arm/arch-ixp4xx/irqs.h
Hunk #1 succeeded at 52 (offset -18 lines).
patching file include/asm-arm/arch-pxa/irqs.h
Hunk #1 succeeded at 110 with fuzz 2 (offset 28 lines).
patching file include/asm-arm/arch-s3c2410/irqs.h
Hunk #1 succeeded at 3 with fuzz 1.
Hunk #2 succeeded at 114 with fuzz 2 (offset -48 lines).
patching file include/asm-arm/arch-sa1100/irqs.h
Hunk #1 succeeded at 145 (offset 1 line).
patching file include/asm-arm/atomic.h
Hunk #1 FAILED at 129.
Hunk #2 FAILED at 142.
Hunk #3 FAILED at 155.
Hunk #4 FAILED at 168.
4 out of 4 hunks FAILED -- saving rejects to file
include/asm-arm/atomic.h.rej
patching file include/asm-arm/bitops.h
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 53.
Hunk #3 FAILED at 65.
Hunk #4 FAILED at 79.
Hunk #5 FAILED at 96.
Hunk #6 FAILED at 113.
6 out of 6 hunks FAILED -- saving rejects to file
include/asm-arm/bitops.h.rej
patching file include/asm-arm/ipipe.h
patching file include/asm-arm/ipipe_base.h
can't find file to patch at input line 5165
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/asm-arm/irqflags.h b/include/asm-arm/irqflags.h
|index 6d09974..0aa4056 100644
|--- a/include/asm-arm/irqflags.h
|+++ b/include/asm-arm/irqflags.h
--------------------------
No file to patch.  Skipping patch.
7 out of 7 hunks ignored
patching file include/asm-arm/mmu_context.h
Hunk #1 FAILED at 95.
1 out of 1 hunk FAILED -- saving rejects to file
include/asm-arm/mmu_context.h.rej
patching file include/asm-arm/system.h
Hunk #1 FAILED at 264.
Hunk #2 FAILED at 326.
2 out of 2 hunks FAILED -- saving rejects to file
include/asm-arm/system.h.rej
patching file include/asm-arm/thread_info.h
Hunk #1 FAILED at 146.
Hunk #2 FAILED at 156.
2 out of 2 hunks FAILED -- saving rejects to file
include/asm-arm/thread_info.h.rej
can't find file to patch at input line 5470
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
|index 8d30229..74b355d 100644
|--- a/include/linux/hardirq.h
|+++ b/include/linux/hardirq.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file include/linux/ipipe.h
patching file include/linux/ipipe_base.h
patching file include/linux/ipipe_compat.h
patching file include/linux/ipipe_percpu.h
patching file include/linux/ipipe_tickdev.h
patching file include/linux/ipipe_trace.h
patching file include/linux/irq.h
Hunk #1 FAILED at 150.
Hunk #2 FAILED at 375.
2 out of 2 hunks FAILED -- saving rejects to file include/linux/irq.h.rej
patching file include/linux/kernel.h
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 107.
2 out of 2 hunks FAILED -- saving rejects to file include/linux/kernel.h.rej
patching file include/linux/linkage.h
Hunk #1 succeeded at 40 (offset -30 lines).
patching file include/linux/mm.h
Hunk #1 FAILED at 104.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/mm.h.rej
patching file include/linux/preempt.h
Hunk #1 FAILED at 9.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/preempt.h.rej
patching file include/linux/sched.h
Hunk #1 FAILED at 58.
Hunk #2 FAILED at 178.
Hunk #3 FAILED at 1174.
Hunk #4 FAILED at 1394.
4 out of 4 hunks FAILED -- saving rejects to file include/linux/sched.h.rej
patching file include/linux/spinlock.h
Hunk #1 FAILED at 89.
Hunk #2 FAILED at 104.
Hunk #3 FAILED at 187.
Hunk #4 FAILED at 279.
Hunk #5 FAILED at 293.
Hunk #6 FAILED at 301.
Hunk #7 FAILED at 315.
Hunk #8 FAILED at 356.
Hunk #9 succeeded at 569 with fuzz 2 (offset 121 lines).
8 out of 9 hunks FAILED -- saving rejects to file
include/linux/spinlock.h.rej
can't find file to patch at input line 6858
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h
|index f6a3a95..4ca73f5 100644
|--- a/include/linux/spinlock_types.h
|+++ b/include/linux/spinlock_types.h
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
patching file init/Kconfig
Hunk #1 FAILED at 64.
1 out of 1 hunk FAILED -- saving rejects to file init/Kconfig.rej
patching file init/main.c
Hunk #1 FAILED at 519.
Hunk #2 FAILED at 572.
Hunk #3 FAILED at 738.
3 out of 3 hunks FAILED -- saving rejects to file init/main.c.rej
patching file kernel/Makefile
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file kernel/Makefile.rej
patching file kernel/exit.c
Hunk #1 FAILED at 994.
1 out of 1 hunk FAILED -- saving rejects to file kernel/exit.c.rej
patching file kernel/fork.c
Hunk #1 FAILED at 403.
Hunk #2 succeeded at 843 (offset -96 lines).
Hunk #3 FAILED at 1217.
2 out of 3 hunks FAILED -- saving rejects to file kernel/fork.c.rej
patching file kernel/ipipe/Kconfig
patching file kernel/ipipe/Kconfig.debug
patching file kernel/ipipe/Makefile
patching file kernel/ipipe/core.c
patching file kernel/ipipe/tracer.c
can't find file to patch at input line 10109
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
|index 44019ce..933c8b3 100644
|--- a/kernel/irq/chip.c
|+++ b/kernel/irq/chip.c
--------------------------
No file to patch.  Skipping patch.
8 out of 8 hunks ignored
patching file kernel/power/disk.c
Hunk #1 FAILED at 154.
Hunk #2 FAILED at 181.
2 out of 2 hunks FAILED -- saving rejects to file kernel/power/disk.c.rej
patching file kernel/power/swsusp.c
Hunk #1 FAILED at 275.
Hunk #2 FAILED at 302.
2 out of 2 hunks FAILED -- saving rejects to file kernel/power/swsusp.c.rej
patching file kernel/printk.c
Hunk #1 succeeded at 600 with fuzz 2 (offset 10 lines).
Hunk #2 FAILED at 660.
Hunk #3 succeeded at 778 with fuzz 2 (offset 78 lines).
1 out of 3 hunks FAILED -- saving rejects to file kernel/printk.c.rej
patching file kernel/sched.c
Hunk #1 succeeded at 741 with fuzz 1 (offset -777 lines).
Hunk #2 FAILED at 1143.
Hunk #3 FAILED at 1192.
Hunk #4 succeeded at 1409 with fuzz 2 (offset -2101 lines).
Hunk #5 FAILED at 1426.
Hunk #6 FAILED at 1538.
Hunk #7 FAILED at 1580.
Hunk #8 FAILED at 1609.
Hunk #9 FAILED at 2262.
Hunk #10 FAILED at 5318.
8 out of 10 hunks FAILED -- saving rejects to file kernel/sched.c.rej
patching file kernel/signal.c
Hunk #1 succeeded at 556 with fuzz 1 (offset 102 lines).
can't find file to patch at input line 10667
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/kernel/spinlock.c b/kernel/spinlock.c
|index cd72424..3e74c9b 100644
|--- a/kernel/spinlock.c
|+++ b/kernel/spinlock.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 10689
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|index a601093..6372a6f 100644
|--- a/lib/Kconfig.debug
|+++ b/lib/Kconfig.debug
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file lib/bust_spinlocks.c
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file lib/bust_spinlocks.c.rej
can't find file to patch at input line 10726
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/ioremap.c b/lib/ioremap.c
|index 14c6078..a275469 100644
|--- a/lib/ioremap.c
|+++ b/lib/ioremap.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 10741
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
|index eddc9b3..66302ec 100644
|--- a/lib/smp_processor_id.c
|+++ b/lib/smp_processor_id.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 10760
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
|index 9c4b025..08f096b 100644
|--- a/lib/spinlock_debug.c
|+++ b/lib/spinlock_debug.c
--------------------------
No file to patch.  Skipping patch.
6 out of 6 hunks ignored
patching file mm/memory.c
Hunk #1 FAILED at 50.
Hunk #2 succeeded at 609 with fuzz 2 (offset 193 lines).
Hunk #3 FAILED at 645.
Hunk #4 FAILED at 685.
Hunk #5 FAILED at 730.
Hunk #6 FAILED at 772.
Hunk #7 FAILED at 1760.
Hunk #8 FAILED at 2992.
7 out of 8 hunks FAILED -- saving rejects to file mm/memory.c.rej
patching file mm/mlock.c
Hunk #1 FAILED at 173.
1 out of 1 hunk FAILED -- saving rejects to file mm/mlock.c.rej
patching file mm/vmalloc.c
Hunk #1 FAILED at 161.
1 out of 1 hunk FAILED -- saving rejects to file mm/vmalloc.c.rej
prepare-kernel.sh: Unable to patch kernel 2.6.8.1 with
adeos-ipipe-2.6.24-arm-1.9-01.patch.
kerhoas <at> kerhoas-desktop:/usr/src/xenomai-2.4.3$






Créez votre adresse électronique prénom.nom <at> laposte.net
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help
Sebastian Smolorz | 2 May 09:53 2008
Picon
Picon

Re: problem patching xenomai with arm

kerhoas.vincent wrote:
> I'm trying to patch a linux kernel 2.6.8 or 2.15 with the  following
> command :
>
> sudo scripts/prepare-kernel.sh  --arch=arm
> \--adeos=/usr/src/adeos-ipipe-2.6.24-arm-1.9-01.patch
> \--linux=/usr/src/linux-2.6.8.1
>
>
> and  I've got an error for both of them.

No suprise. You try to patch a 2.6.8 kernel with a patch that was made for 
kernel 2.6.24. The adeos patch must match the linux kernel version you try to 
patch.

> Is Xenomai realy working for  ARM ?

Yes, as long as you follow the advise given above and your ARM platform is 
supported.

> The patch is ok with those version of linux (I've got an error with  the
> other ARM patches given with xenomai 2.4.3) ?

See above.

--

-- 
Sebastian
Philippe Gerum | 2 May 09:56 2008

Re: MSI Interrupt Crash

jeff koftinoff wrote:
> 
> Hi all,
>  
> I am currently writing an rtdm driver for an fpga card.
> I am using the latest Xenomai version from the svn repository and kernel
> version 2.6.24.5.
> This runs on a Core2Duo with a debian 64 bit version.
> The driver seems to work fine as long as I use legacy interrupts and not
> MSI's.
> 
> 
> As soon as I use pci_enable_msi before rtdm_irq_request I get:
>  
> [ 4260.359093] fpga_driver :MSI Enabled
> [ 4260.359095] fpga_driver :IORESOURCE_IRQ IRQ: 248
> [ 4260.359109] Unable to handle kernel NULL pointer dereference at
> 0000000000000000 RIP:
> [ 4260.359113]  [<0000000000000000>]
> [ 4260.359117] PGD 3b1f7067 PUD 3b1f6067 PMD 0
> [ 4260.359121] Oops: 0010 [1] SMP
> [ 4260.359125] CPU 1
> [ 4260.359127] Modules linked in: fpga_module(P) af_packet binfmt_misc
> rfcomm l2cap bluetooth ppdev ipv6 sbs container dock video output sbshc
> battery iptable_filter ip_tables x_tables ac coretemp max6650 sbp2
> parport_pc lp parport atl1 mii i2c_core psmouse serio_raw button shpchp
> iTCO_wdt iTCO_vendor_support intel_agp pci_hotplug evdev pcspkr ext3 jbd
> mbcache sg sr_mod cdrom ata_generic sd_mod pata_acpi usbhid hid ohci1394
> ieee1394 ahci pata_jmicron libata scsi_mod ehci_hcd uhci_hcd usbcore
> dm_mirror dm_snapshot dm_mod fan fuse
> [ 4260.359179] Pid: 7016, comm: insmod Tainted: P        2.6.24.5 #1
> [ 4260.359181] RIP: 0010:[<0000000000000000>]  [<0000000000000000>]
> [ 4260.359185] RSP: 0000:ffff81003b23dc80  EFLAGS: 00010246
> [ 4260.359187] RAX: ffffffff805dc2c0 RBX: 0000000000000000 RCX:
> ffff810001018780
> [ 4260.359189] RDX: ffff81008099a000 RSI: 0000000000000000 RDI:
> 00000000000000f8
> [ 4260.359192] RBP: ffffffff882cc688 R08: 0000000000000000 R09:
> 00000000000000c1
> [ 4260.359194] R10: 0000000000000000 R11: 0000000000000000 R12:
> ffff81003ee87800
> [ 4260.359196] R13: ffffffff882cbee0 R14: 0000000000000000 R15:
> 000000000000000f
> [ 4260.359198] FS:  00002b43257436e0(0000) GS:ffff81003ec01700(0000)
> knlGS:0000000000000000
> [ 4260.359200] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> [ 4260.359202] CR2: 0000000000000000 CR3: 0000000032168000 CR4:
> 00000000000006e0
> [ 4260.359204] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [ 4260.359206] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [ 4260.359209] Process insmod (pid: 7016, threadinfo ffff81003b23c000,
> task ffff810032166fc0)
> [ 4260.359210] Stack:  ffffffff8041e0ff ffff81003ee87800
> ffffffff802c8a58 ffff81003ee87800
> [ 4260.359216]  ffff81003ee87800 ffff81003ee87800 ffffffff882ca374
> 0000000000000000
> [ 4260.359221]  ffffffff882ca521 0000000000000001 ffff81003ee87870
> ffffffff882cc1a0
> [ 4260.359225] Call Trace:
> [ 4260.359231]  [<ffffffff8041e0ff>] rthal_irq_enable+0x2f/0x40
> [ 4260.359236]  [<ffffffff802c8a58>] rtdm_irq_request+0x48/0x60
> [ 4260.359242]  [<ffffffff882ca374>]
> :fpga_module:pci_request_resources+0x104/0x1d0
> [ 4260.359246]  [<ffffffff882ca521>] :fpga_module:pci_probe+0xe1/0x180
> [ 4260.359250]  [<ffffffff8039ec88>] pci_device_probe+0xf8/0x170
> [ 4260.359256]  [<ffffffff8040069c>] driver_probe_device+0x9c/0x1b0
> [ 4260.359259]  [<ffffffff80400969>] __driver_attach+0xc9/0xd0
> [ 4260.359262]  [<ffffffff804008a0>] __driver_attach+0x0/0xd0
> [ 4260.359265]  [<ffffffff803ff8dd>] bus_for_each_dev+0x4d/0x80
> [ 4260.359270]  [<ffffffff803ffcec>] bus_add_driver+0xac/0x220
> [ 4260.359274]  [<ffffffff8039ef09>] __pci_register_driver+0x69/0xb0
> [ 4260.359280]  [<ffffffff88069037>] :fpga_module:card_init+0x37/0x64
> [ 4260.359284]  [<ffffffff802657be>] sys_init_module+0x18e/0x1a90
> [ 4260.359293]  [<ffffffff80389b28>] _atomic_dec_and_lock+0x48/0x70
> [ 4260.359298]  [<ffffffff80253330>] param_get_int+0x0/0x20
> [ 4260.359304]  [<ffffffff8020c3f2>] system_call+0x92/0x97
> [ 4260.359308]
> [ 4260.359310]
> [ 4260.359310] Code:  Bad RIP value.
> [ 4260.359313] RIP  [<0000000000000000>]
> [ 4260.359315]  RSP <ffff81003b23dc80>
> [ 4260.359316] CR2: 0000000000000000
> [ 4260.359325] ---[ end trace 502b14894d3ed93b ]---
>  
> Any advice?
> 

Does this help?

--- include/asm-x86/wrappers_64.h	(revision 3719)
+++ include/asm-x86/wrappers_64.h	(revision 3720)
 <at>  <at>  -31,8 +31,8  <at>  <at> 
 #define rthal_irq_descp(irq)		(irq_desc + irq)
 #define rthal_irq_desc_status(irq)	(rthal_irq_descp(irq)->status)

-#define rthal_irq_chip_enable(irq)   ({ rthal_irq_descp(irq)->chip->enable(irq); 0; })
-#define rthal_irq_chip_disable(irq)  ({ rthal_irq_descp(irq)->chip->disable(irq); 0; })
+#define rthal_irq_chip_enable(irq)   ({ rthal_irq_descp(irq)->chip->unmask(irq); 0; })
+#define rthal_irq_chip_disable(irq)  ({ rthal_irq_descp(irq)->chip->mask(irq); 0; })
 #define rthal_irq_chip_end(irq)      ({ rthal_irq_descp(irq)->ipipe_end(irq, rthal_irq_descp(irq));
0; })

 typedef irq_handler_t rthal_irq_host_handler_t;

--

-- 
Philippe.
Jan Kiszka | 2 May 10:50 2008
Picon

Re: MSI Interrupt Crash

Philippe Gerum wrote:
> jeff koftinoff wrote:
>> Hi all,
>>  
>> I am currently writing an rtdm driver for an fpga card.
>> I am using the latest Xenomai version from the svn repository and kernel
>> version 2.6.24.5.
>> This runs on a Core2Duo with a debian 64 bit version.
>> The driver seems to work fine as long as I use legacy interrupts and not
>> MSI's.
>>
>>
>> As soon as I use pci_enable_msi before rtdm_irq_request I get:
>>  
>> [ 4260.359093] fpga_driver :MSI Enabled
>> [ 4260.359095] fpga_driver :IORESOURCE_IRQ IRQ: 248
>> [ 4260.359109] Unable to handle kernel NULL pointer dereference at
>> 0000000000000000 RIP:
>> [ 4260.359113]  [<0000000000000000>]
>> [ 4260.359117] PGD 3b1f7067 PUD 3b1f6067 PMD 0
>> [ 4260.359121] Oops: 0010 [1] SMP
>> [ 4260.359125] CPU 1
>> [ 4260.359127] Modules linked in: fpga_module(P) af_packet binfmt_misc
>> rfcomm l2cap bluetooth ppdev ipv6 sbs container dock video output sbshc
>> battery iptable_filter ip_tables x_tables ac coretemp max6650 sbp2
>> parport_pc lp parport atl1 mii i2c_core psmouse serio_raw button shpchp
>> iTCO_wdt iTCO_vendor_support intel_agp pci_hotplug evdev pcspkr ext3 jbd
>> mbcache sg sr_mod cdrom ata_generic sd_mod pata_acpi usbhid hid ohci1394
>> ieee1394 ahci pata_jmicron libata scsi_mod ehci_hcd uhci_hcd usbcore
>> dm_mirror dm_snapshot dm_mod fan fuse
>> [ 4260.359179] Pid: 7016, comm: insmod Tainted: P        2.6.24.5 #1
>> [ 4260.359181] RIP: 0010:[<0000000000000000>]  [<0000000000000000>]
>> [ 4260.359185] RSP: 0000:ffff81003b23dc80  EFLAGS: 00010246
>> [ 4260.359187] RAX: ffffffff805dc2c0 RBX: 0000000000000000 RCX:
>> ffff810001018780
>> [ 4260.359189] RDX: ffff81008099a000 RSI: 0000000000000000 RDI:
>> 00000000000000f8
>> [ 4260.359192] RBP: ffffffff882cc688 R08: 0000000000000000 R09:
>> 00000000000000c1
>> [ 4260.359194] R10: 0000000000000000 R11: 0000000000000000 R12:
>> ffff81003ee87800
>> [ 4260.359196] R13: ffffffff882cbee0 R14: 0000000000000000 R15:
>> 000000000000000f
>> [ 4260.359198] FS:  00002b43257436e0(0000) GS:ffff81003ec01700(0000)
>> knlGS:0000000000000000
>> [ 4260.359200] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>> [ 4260.359202] CR2: 0000000000000000 CR3: 0000000032168000 CR4:
>> 00000000000006e0
>> [ 4260.359204] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
>> 0000000000000000
>> [ 4260.359206] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
>> 0000000000000400
>> [ 4260.359209] Process insmod (pid: 7016, threadinfo ffff81003b23c000,
>> task ffff810032166fc0)
>> [ 4260.359210] Stack:  ffffffff8041e0ff ffff81003ee87800
>> ffffffff802c8a58 ffff81003ee87800
>> [ 4260.359216]  ffff81003ee87800 ffff81003ee87800 ffffffff882ca374
>> 0000000000000000
>> [ 4260.359221]  ffffffff882ca521 0000000000000001 ffff81003ee87870
>> ffffffff882cc1a0
>> [ 4260.359225] Call Trace:
>> [ 4260.359231]  [<ffffffff8041e0ff>] rthal_irq_enable+0x2f/0x40
>> [ 4260.359236]  [<ffffffff802c8a58>] rtdm_irq_request+0x48/0x60
>> [ 4260.359242]  [<ffffffff882ca374>]
>> :fpga_module:pci_request_resources+0x104/0x1d0
>> [ 4260.359246]  [<ffffffff882ca521>] :fpga_module:pci_probe+0xe1/0x180
>> [ 4260.359250]  [<ffffffff8039ec88>] pci_device_probe+0xf8/0x170
>> [ 4260.359256]  [<ffffffff8040069c>] driver_probe_device+0x9c/0x1b0
>> [ 4260.359259]  [<ffffffff80400969>] __driver_attach+0xc9/0xd0
>> [ 4260.359262]  [<ffffffff804008a0>] __driver_attach+0x0/0xd0
>> [ 4260.359265]  [<ffffffff803ff8dd>] bus_for_each_dev+0x4d/0x80
>> [ 4260.359270]  [<ffffffff803ffcec>] bus_add_driver+0xac/0x220
>> [ 4260.359274]  [<ffffffff8039ef09>] __pci_register_driver+0x69/0xb0
>> [ 4260.359280]  [<ffffffff88069037>] :fpga_module:card_init+0x37/0x64
>> [ 4260.359284]  [<ffffffff802657be>] sys_init_module+0x18e/0x1a90
>> [ 4260.359293]  [<ffffffff80389b28>] _atomic_dec_and_lock+0x48/0x70
>> [ 4260.359298]  [<ffffffff80253330>] param_get_int+0x0/0x20
>> [ 4260.359304]  [<ffffffff8020c3f2>] system_call+0x92/0x97
>> [ 4260.359308]
>> [ 4260.359310]
>> [ 4260.359310] Code:  Bad RIP value.
>> [ 4260.359313] RIP  [<0000000000000000>]
>> [ 4260.359315]  RSP <ffff81003b23dc80>
>> [ 4260.359316] CR2: 0000000000000000
>> [ 4260.359325] ---[ end trace 502b14894d3ed93b ]---
>>  
>> Any advice?
>>
> 
> Does this help?
> 
> --- include/asm-x86/wrappers_64.h	(revision 3719)
> +++ include/asm-x86/wrappers_64.h	(revision 3720)
>  <at>  <at>  -31,8 +31,8  <at>  <at> 
>  #define rthal_irq_descp(irq)		(irq_desc + irq)
>  #define rthal_irq_desc_status(irq)	(rthal_irq_descp(irq)->status)
> 
> -#define rthal_irq_chip_enable(irq)   ({ rthal_irq_descp(irq)->chip->enable(irq); 0; })
> -#define rthal_irq_chip_disable(irq)  ({ rthal_irq_descp(irq)->chip->disable(irq); 0; })
> +#define rthal_irq_chip_enable(irq)   ({ rthal_irq_descp(irq)->chip->unmask(irq); 0; })
> +#define rthal_irq_chip_disable(irq)  ({ rthal_irq_descp(irq)->chip->mask(irq); 0; })

Will probably create a BUG on disable, as not all irq_chips define
unmask IIRC. I'm still puzzled why the always-defined (in theory)
default handlers for enable/disable do not work.

Jan

--

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

Gmane