All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] mmap and secondary mode
@ 2006-10-27  9:13 Roderik_Wildenburg
  2006-10-27 13:19 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Roderik_Wildenburg @ 2006-10-27  9:13 UTC (permalink / raw)
  To: xenomai

Just to be sure :
Does the access of a mmaped address (real_mmamp of a device file e.g.
/dev/dualportmemory) force Xenomai to switch to secondary mode ?
I would say yes, as the access of the address probably results into a
read/write of the device file.
Am I right ?

Thanks for your help
Roderik


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] mmap and secondary mode
  2006-10-27  9:13 [Xenomai-help] mmap and secondary mode Roderik_Wildenburg
@ 2006-10-27 13:19 ` Jan Kiszka
  2006-10-30 12:15   ` Wolfgang Grandegger
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2006-10-27 13:19 UTC (permalink / raw)
  To: Roderik_Wildenburg; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

Roderik_Wildenburg@domain.hid wrote:
> Just to be sure :
> Does the access of a mmaped address (real_mmamp of a device file e.g.
> /dev/dualportmemory) force Xenomai to switch to secondary mode ?
> I would say yes, as the access of the address probably results into a
> read/write of the device file.
> Am I right ?

Depends. If that mapping takes place directly on a physical memory
region *ahead-of-use*, then you are safe (like with rtdm_iomap_to_user
from 2.3-devel). But if there is some Linux driver logic in between that
is triggered via page faults on access to those memory blocks, this is
certainly indeterministic. Probably easy to find out by analysing the
Linux driver in question /wrt its mapping code.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] mmap and secondary mode
  2006-10-27 13:19 ` Jan Kiszka
@ 2006-10-30 12:15   ` Wolfgang Grandegger
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Grandegger @ 2006-10-30 12:15 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Roderik_Wildenburg, xenomai

Jan Kiszka wrote:
> Roderik_Wildenburg@domain.hid wrote:
>> Just to be sure :
>> Does the access of a mmaped address (real_mmamp of a device file e.g.
>> /dev/dualportmemory) force Xenomai to switch to secondary mode ?
>> I would say yes, as the access of the address probably results into a
>> read/write of the device file.
>> Am I right ?
> 
> Depends. If that mapping takes place directly on a physical memory
> region *ahead-of-use*, then you are safe (like with rtdm_iomap_to_user
> from 2.3-devel). But if there is some Linux driver logic in between that
> is triggered via page faults on access to those memory blocks, this is
> certainly indeterministic. Probably easy to find out by analysing the
> Linux driver in question /wrt its mapping code.

But it should be save to call the driver's mmap function in secondary 
mode (init code) and use the virtual address later on in primary mode.

Wolfgang.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-30 12:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-27  9:13 [Xenomai-help] mmap and secondary mode Roderik_Wildenburg
2006-10-27 13:19 ` Jan Kiszka
2006-10-30 12:15   ` Wolfgang Grandegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.