From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51EBE3FF.3050602@163.com> Date: Sun, 21 Jul 2013 21:37:03 +0800 From: aking MIME-Version: 1.0 References: <51E4F63A.7080203@163.com> <51E55AB0.8070600@siemens.com> <51E7FA79.6030602@163.com> <51E9235B.7020802@xenomai.org> In-Reply-To: <51E9235B.7020802@xenomai.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] general kernel functions in RTDM? List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: Jan Kiszka , "xenomai@xenomai.org" On 7/19/2013 Friday 7:30 PM, Gilles Chanteperdrix wrote: > On 07/18/2013 04:23 PM, aking wrote: > >> On 7/16/2013 Tuesday 10:37 PM, Jan Kiszka wrote: >>> On 2013-07-16 09:28, aking_jin wrote: >>>> Hi,all >>>> What should be take care of while using general kernel functions in >>>> RTDM? for example: dma operation, GPIO operation and etc . >>> Depends on their usage context. You can normally use Linux service >>> while >>> the driver is in Linux context. But once you run over an RT IRQ, RT >>> timer handler or RT thread (kernel/userspace), most Linux services >>> become taboo. >>> >>> DMA mapping/unmapping, e.g., may still work if it involves no hardware >>> or software IOMMU, otherwise it is required to premap the regions >>> during >>> setup over a Linux context. GPIO may involve Linux code that >>> synchronizes against concurrent access. If that code was hardened as >>> part of the I-pipe patch, you are safe again. >>> >>> Hope this helped to get the general picture. Detailed answers depend on >>> what you do, and on which hardware. >>> >>> Jan >>> >> How could I toggle gpio in isr of xenomai RTDM? >> Thanks >> > > No answer, so, you probably did not understand: on what architecture > are you using Xenomai? x86? arm? other? > > If on ARM, gpio_set_value should allow toggling the GPIO in an RTDM > ISR, but you have to pay attention to: > > http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#GPIOs_in_real-time_drivers > > I'm using arm, Xscale architecture. Thank you Very much. -- Best Regards aking_jin