From: Johan Borkhuis <j.borkhuis@domain.hid>
To: "Markus Osterried (BA/EDD)" <markus.osterried@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] rtdm_iomap_to_user() with PowerPC
Date: Fri, 07 Sep 2007 14:51:01 +0200 [thread overview]
Message-ID: <46E14935.3020902@domain.hid> (raw)
In-Reply-To: <E5E9C6CC7DC8844A8DA7A9EFE7B5350E08F1F9@domain.hid>
Markus Osterried (BA/EDD) wrote:
>
> Hello,
>
> I want to use rtdm_iomap_to_user() to map our device registers to user
> space.
> But this doesn't work, our application just crashes when I read from
> the mapped registers.
>
> When I insert the line
>
> vma->vm_page_prot = phys_mem_access_prot(filp,
> paddr>>PAGE_SHIFT, size, vma->vm_page_prot);
>
> in rtdm_mmap_buffer() just before calling xnarch_remap_io_page_range()
> it works fine.
> This is just like it is done in /drivers/char/mem.c and in
> /drivers/video/fbmem.c.
>
> But I think this is architecture and kernel version dependent and I
> don't know whether rtdm_mmap_buffer() is the right place.
>
> I use Xenomai 2.3.1 and Linux 2.6.18 with PowerPC CPU.
> What is the best solution? Everyone else seen this problem?
>
I had the same problem, but I solved this by using 2 drivers, one linux
driver that implemented mmap, and an RTDM driver for the realtime
functions. On startup I do the mmap, and then enter RT-mode and can use
this mapped area in my RT-application. But it would be better if the
mmap function would also be supported by Xenomai.
Kind regards,
Johan Borkhuis
next prev parent reply other threads:[~2007-09-07 12:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 8:45 [Xenomai-core] rtdm_iomap_to_user() with PowerPC Markus Osterried (BA/EDD)
2007-09-06 21:32 ` Jan Kiszka
2007-09-07 12:51 ` Johan Borkhuis [this message]
2007-09-07 14:13 ` Philippe Gerum
-- strict thread matches above, loose matches on Subject: below --
2007-11-07 14:28 Markus Osterried
2007-11-07 14:45 ` Jan Kiszka
2007-11-07 15:44 ` Markus Osterried
2007-11-07 16:08 ` Jan Kiszka
2007-11-08 8:51 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E14935.3020902@domain.hid \
--to=j.borkhuis@domain.hid \
--cc=markus.osterried@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.