On 11/01/2017 10:14 PM, Philippe Gerum wrote:
> On 10/07/2017 03:56 AM, Jackson Jones wrote:
>> I noticed that when I call rtdm_safe_copy_from_user() it causes a mode
>> switch. I am looking to pass a uint32_t (u32 in kernel space) from
>> user-space to a rtdm driver.
>>
>> Is there a way of doing this that avoids a mode switch. I am doing this in
>> an rtdm spi driver for the imx6. It is used to change the transfer size
>> (number of words) for the next call to transfer_iobufs (using the
>> SPI_RTIOC_TRANSFER ioctl).
>>
> 
> The mode switch is most likely caused by an access fault taken by the
> CPU. Is /proc/xenomai/fault confirming this?
> 

More precisely, this is most likely a fault due to a page table miss
which cannot be resolved on the fly by a simple page table fixup then
return. Instead, the whole thing has to go through the regular kernel
page fault handler, which requires Cobalt to switch to secondary mode
first.

-- 
Philippe.

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to