Nilanjan Roychowdhury wrote: > > > Hi, > I had a linux driver with functionalities like it blocks a thread on an > ioctl and wakes it up when an interrupt occurs and does some processing. > Now I want to migrate to xenomai space. Can I write a user space device > driver for this like I create an user space rt_task and call > rt_intr_wait in the entry fuction of the task and whenever I get an > interrupt I wake up and do the processing. Will I have any performance > hit?? I will make sure the priority of this xenomai task is higher than > any other xenomai task as it will do some interrupt processing. > > In general, if I need to migrate a traditional linux device driver with > only user space clients to xenomai space can I write a user - space > device driver ???
You can. Both native and posix skin provide means to block a user-space thread on an IRQ event. And if you already have a working user-space driver, that step should be simple as there are likely no problems with kernel-only services like DMA management. It is planned to enhance the Real-Time Driver Model (RTDM) with user-space support as well, keeping both the programming model for the driver users (profiles) as well as for the driver developers as far as feasible. The idea is to make drivers easily re-compilable/portable between kernel and user-space - but that's something which cannot help you yet. > > Under what scenario we place a driver as a kernel module in xenomai > space?? Performance will remain a reason to go to kernel-space, specifically if you either share your device between multiple processes (having a driver in a separate process comes at a price...) or if you need low latency on IRQ handling. But there are also reasons to go to user-space, e.g. license issues. We are trying to address both. In any case, a clear separation between driver and application design is highly recommended and something we try to foster with RTDM. Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
