request_region from rtdm_task
Hi,
is it OK to call function request_region from kernel rtdm task?
or, should there be any problems when using io ports in rtdm task from range requested in non-rt kernel thread?
thanks in advance
maciek
Quoted 3 lines · Maciek Godek
Hi,
is it OK to call function
request_regionfrom kernel rtdm task?
Generally, you have to review each Linux service you call from RT context /wrt determinism and locking issues. And often this analysis is kernel release-dependent. So, better avoid this. This is even more unneeded when service like this one aim at the driver initialisation, not at its operation mode.
Quoted 3 lines
or, should there be any problems when using io ports in rtdm task from range requested in non-rt kernel thread?
request_region does not track the calling process implicitly. All it saves is the arbitrary name you passed. So, yes, you can call it safely during the usual, non-RT driver initialisation and simply use the ports later on in RT context. You could even play roulette and skin request_region, but that would be error-prone or at least bad style (for any kind of Linux driver).
Jan