All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] rtdm_mmap_to_user() remapping problem on powerpc arch.
@ 2008-10-29 10:34 Matteo Facchinetti @ Sirius Electronic Systems S.R.L.
  2008-10-29 13:49 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Matteo Facchinetti @ Sirius Electronic Systems S.R.L. @ 2008-10-29 10:34 UTC (permalink / raw)
  To: xenomai

Hi all,

I'm using framework RTDM to develop my driver on embedded system mpc5200 
based.
(kernel 2.6.24.4 (powerpc arch) - xenomai 2.4.3).

I've need to use rtdm_mmap_to_user() to share a kmalloc() kernel memory 
in userspace.
For this, I'm using the example in  
http://www.captain.at/xenomai-real-time-driver-example.php.

Running a similar example I've discovered a problem in kmalloc remapping.
The only way that I've found, to make remapping correctly, is to 
allocate an entire kernel mem page with __get_freepage() instead of 
kmalloc().

I think that could be a bug in powerpc arch.
what do you think about?





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

* Re: [Xenomai-core] rtdm_mmap_to_user() remapping problem on powerpc arch.
  2008-10-29 10:34 [Xenomai-core] rtdm_mmap_to_user() remapping problem on powerpc arch Matteo Facchinetti @ Sirius Electronic Systems S.R.L.
@ 2008-10-29 13:49 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-29 13:49 UTC (permalink / raw)
  To: Matteo Facchinetti @ Sirius Electronic Systems S.R.L.; +Cc: xenomai

Matteo Facchinetti @ Sirius Electronic Systems S.R.L. wrote:
> Hi all,
> 
> I'm using framework RTDM to develop my driver on embedded system mpc5200 
> based.
> (kernel 2.6.24.4 (powerpc arch) - xenomai 2.4.3).
> 
> I've need to use rtdm_mmap_to_user() to share a kmalloc() kernel memory 
> in userspace.
> For this, I'm using the example in  
> http://www.captain.at/xenomai-real-time-driver-example.php.
> 
> Running a similar example I've discovered a problem in kmalloc remapping.
> The only way that I've found, to make remapping correctly, is to 
> allocate an entire kernel mem page with __get_freepage() instead of 
> kmalloc().
> 
> I think that could be a bug in powerpc arch.
> what do you think about?

There are two known problems with memory mapping:
- one when using high memory (more than 1GB RAM), for which a proposed
fix is here:
https://mail.gna.org/public/xenomai-core/2008-09/msg00118.html
- one specifically on power pc, fixed here:
https://mail.gna.org/public/xenomai-help/2008-10/msg00096.html

-- 
                                                 Gilles.


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

end of thread, other threads:[~2008-10-29 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 10:34 [Xenomai-core] rtdm_mmap_to_user() remapping problem on powerpc arch Matteo Facchinetti @ Sirius Electronic Systems S.R.L.
2008-10-29 13:49 ` Gilles Chanteperdrix

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.