Filip Van Rillaer | 1 Aug 2008 12:50

Re: xnpipe EPOLLIN starvation

Hello Philippe,

FYI: As I was not 100% sure that the EPOLLET of a read on a fd didn't
impact the write on the same fd, I just made a new version of xenopipe
(still with epoll) with separate filedescriptors for read and write in
the epoll_ctl.   So epoll_wait has 4 entries : fd_tty1_read,
fd_tty1_write, fd_pipe_read, fd_pipe_write ... but the problem remains.

To be able to open a pipe (e.g. /dev/rtp1) once as O_WRONLY and once as
O_RDONLY, I had to hack the pipe-code.  It would be nice if this would
be possible without hacking the code.

Best regards,
Filip
Henry Bausley | 2 Aug 2008 01:07

Recurring Interrupts

How do I setup xenomai so that my ISR can be re-entered even if I am 
currently in it.

I have an external edge interrupt wired and it occurs every 250usec.  There 
are instances
when the interrupt can occur while I am currently in my ISR.

If another interrupt occurs while I am currently in my ISR I want my ISR to 
be called again
so I can flag that the condition occurred then exit the re-entered ISR and 
continue executing
the originally called ISR.

I am using a board based off the AMCC 440EP Yosemite and a Denx Kit with 
2.6.24 and Xenomai 2.4.2
This something I did with previously with RT Linux.  I have converted a 
large project from FSM RT Linux
to Xenomai and everything is functioning except this last item.
Philippe Gerum | 2 Aug 2008 09:38
Favicon

Re: Recurring Interrupts

Henry Bausley wrote:
> How do I setup xenomai so that my ISR can be re-entered even if I am 
> currently in it.
>

Try this:

int your_isr(xnintr_t *intr)
{
	unsigned long flags;

	xnlock_clear_irqon(&nklock);

	... your code ...

	xnlock_get_irqsave(&nklock, flags); /* must re-lock on exit */
}

We do take a per-IRQ lock internally as well, but this is a no-brainer for the
issue at stake.

NOTE: this solution is only valid in uniprocessor mode. SMP would run into
deadlocks; we would need to provide internal support to allow this.

> I have an external edge interrupt wired and it occurs every 250usec.  There 
> are instances
> when the interrupt can occur while I am currently in my ISR.
> 
> If another interrupt occurs while I am currently in my ISR I want my ISR to 
> be called again
(Continue reading)

Philippe Gerum | 2 Aug 2008 14:24
Favicon

Re: Recurring Interrupts

Philippe Gerum wrote:
> Henry Bausley wrote:
>> How do I setup xenomai so that my ISR can be re-entered even if I am 
>> currently in it.
>>
> 
> Try this:
> 

The following is needed to allow the same interrupt to recurse as well.

> int your_isr(xnintr_t *intr)
> {
> 	unsigned long flags;
>

+	xnintr_enable(intr);

> 	xnlock_clear_irqon(&nklock);
> 
> 	... your code ...
> 
> 	xnlock_get_irqsave(&nklock, flags); /* must re-lock on exit */

+	return XN_ISR_HANDLED | XN_ISR_NOENABLE;
> }

> 
> We do take a per-IRQ lock internally as well, but this is a no-brainer for the
> issue at stake.
(Continue reading)

stefano.franzoni | 4 Aug 2008 16:49
Favicon

xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem


Dear

I am trying to install Xenomai under Ubuntu following this guide:
http://www.xenomai.org/index.php/Xenomai_quick_build_quide


I have successfully patched the kernel with xenomai and compiled it.

I have created a new entry in grub/menu.lst

title kernel 2.6.25.11 with xenomai 2.4.4 and Ubuntu 8.04
root (hd0,2)
kernel /boot/vmlinuz-2.6.25.11-xenomai-2.4.4 root=/dev/hdb3 ro
zeno_nucleus.xenomai_gid=1004

I have one hard disk with two partitions and I am working on hdb3.

At the reboot of the PC I see the message:

cannot open root device "hdb3" or unknown-block(0,0)
please append a correct root= boot option; here are the available
partitions:
0100 65536 ram0 (driver?)
0101 65536 ram1 (driver?)
…
010f 65536 ram15 (driver?)

kernel panic - not syncing: VFS unable to mount root fs on
unknown-block(0,0)

(Continue reading)

Gilles Chanteperdrix | 4 Aug 2008 16:54
Favicon

Re: xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem

stefano.franzoni <at> marposs.com wrote:
> - I have also included in the kernel, not as module, the
> ATA/ATAPI/MFM/RLL Support -> Enhanced IDE/MFM
> 
> Any suggestions?

You also need to enable the actual IDE controller used by your computer
(the Enhanced IDE/MFM setting is just an option that will make the IDE
controllers visible, but as such it does not cause any
controller-specific code to be compiled). If in doubt, enable all IDE
controllers, boot, read the logs, then only keep the controller which
you really use.

Note that if you have a sufficiently recent hardware, your IDE
controller will in fact be a SATA controller, and your root partition
will become /dev/sda3, this requires a few changes in /etc/fstab that
are unfortunately incompatible with a previous installation.

--

-- 
                                                 Gilles.
Gilles Chanteperdrix | 4 Aug 2008 17:05
Favicon

Re: xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem

stefano.franzoni <at> marposs.com wrote:
> Dear
> 
> I am trying to install Xenomai under Ubuntu following this guide:
> http://www.xenomai.org/index.php/Xenomai_quick_build_quide

Note that even if this guide documents the case when you disable initrd,
Xenomai will run just fine with an initrd.

--

-- 
                                                 Gilles.
Dehann Fourie | 5 Aug 2008 13:22
Picon

Re: xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem

HI,

Im not the expert but I had the same problem under xubuntu 7.10. I tried mkinitrd, but this command doesn't come standard with Ubuntu. I resorted to Debian and installed under an unencrypted fs. I think that the fs encryption could be ur problem.

Dehann

On Mon, Aug 4, 2008 at 4:49 PM, <stefano.franzoni <at> marposs.com> wrote:

Dear

I am trying to install Xenomai under Ubuntu following this guide:
http://www.xenomai.org/index.php/Xenomai_quick_build_quide

I have successfully patched the kernel with xenomai and compiled it.

I have created a new entry in grub/menu.lst

title kernel 2.6.25.11 with xenomai 2.4.4 and Ubuntu 8.04
root (hd0,2)
kernel /boot/vmlinuz-2.6.25.11-xenomai-2.4.4 root=/dev/hdb3 ro
zeno_nucleus.xenomai_gid=1004

I have one hard disk with two partitions and I am working on hdb3.

At the reboot of the PC I see the message:

cannot open root device "hdb3" or unknown-block(0,0)
please append a correct root= boot option; here are the available
partitions:
0100 65536 ram0 (driver?)
0101 65536 ram1 (driver?)

010f 65536 ram15 (driver?)

kernel panic - not syncing: VFS unable to mount root fs on
unknown-block(0,0)

- I have included in the kernel, not as module the File System EXT3.
- I have also included in the kernel, not as module, the
ATA/ATAPI/MFM/RLL Support -> Enhanced IDE/MFM

Any suggestions?

Thanks in advance

----------------------------------------------------------------
Stefano Franzoni
Sofware Research
Marposs S.p.A. - via Saliceto 13
40010 Bentivoglio (BO) - Italy
www.marposs.com

Tel: +39 051 899633
Fax: +39 051 899802
stefano.franzoni <at> marposs.com
----------------------------------------------------------------
_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help

_______________________________________________
Xenomai-help mailing list
Xenomai-help <at> gna.org
https://mail.gna.org/listinfo/xenomai-help
Gilles Chanteperdrix | 5 Aug 2008 14:03
Favicon

Re: xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem

Dehann Fourie wrote:
> HI,
> 
> Im not the expert but I had the same problem under xubuntu 7.10. I tried
> mkinitrd, but this command doesn't come standard with Ubuntu. I resorted to
> Debian and installed under an unencrypted fs. I think that the fs encryption
> could be ur problem.

mkinitrd is and old package, replaced with mkinitramfs. There is no
reason fs encryption could be a problem with Xenomai, and if it is, then
it is a bug and needs fixing.

--

-- 
                                                 Gilles.
stefano.franzoni | 5 Aug 2008 17:02
Favicon

Re: xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu problem

Hello Gilles,

The problem is solved, it was exactly the Enhanced IDE/MFM option.

Many thanks

Stefano

                                                                           
             Gilles                                                        
             Chanteperdrix                                                 
             <gilles.chanteper                                          To 
             drix <at> xenomai.org>         stefano.franzoni <at> marposs.com        
                                                                        cc 
             04/08/2008 16:54          xenomai-help <at> gna.org                
                                                                   Subject 
                                       Re: [Xenomai-help] xenomai version  
                                       2.4.4 with linux kernel 2.6.25.11   
                                       under ubuntu problem                

stefano.franzoni <at> marposs.com wrote:
> - I have also included in the kernel, not as module, the
> ATA/ATAPI/MFM/RLL Support -> Enhanced IDE/MFM
>
> Any suggestions?

You also need to enable the actual IDE controller used by your computer
(the Enhanced IDE/MFM setting is just an option that will make the IDE
controllers visible, but as such it does not cause any
controller-specific code to be compiled). If in doubt, enable all IDE
controllers, boot, read the logs, then only keep the controller which
you really use.

Note that if you have a sufficiently recent hardware, your IDE
controller will in fact be a SATA controller, and your root partition
will become /dev/sda3, this requires a few changes in /etc/fstab that
are unfortunately incompatible with a previous installation.

--
                                                 Gilles.

Gmane