All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: "Herrera-Bendezu, Luis" <lherrera@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] rtdm_iomap_to_user with phys addr > 4G
Date: Wed, 18 Nov 2009 17:42:23 +0100	[thread overview]
Message-ID: <4B0423EF.9030307@domain.hid> (raw)
In-Reply-To: <6FCCA913376DD7488F4139A4D11B8F48FD17F8@domain.hid>

Herrera-Bendezu, Luis wrote:
> Jan,
> 
>> I think we can change rtdm_iomap_to_user to take src_addr as 
>> phys_addr_t
>> and propagate this internally properly. We also need to add a wrapper
>> for phys_addr_t for kernels that doesn't support this (<2.6.28). To my
>> current understanding, this should be sufficient, right?
>>
> 
> This is a diff against Xenomai version 2.4.8 and Linux version 2.6.28 to
> handle RTDM mapping to user space of devices located at addresses > 4
> GB.

Does it apply against git-head as well? Note that this won't make it
into stable 2.4.

> Rather than modifying existing rtdm_iomap_to_user() API a new one is
> added, rtdm_iomap_to_user64() (to mimic mmap64()). Since this is a user
> API it can not use phys_addr_t so unsigned long long is used for the
> interface.

64 bit is not related to phys_addr_t. It /may/ be 64 bit, but it may
also be less (or more one day...?). So let's switch the existing
interface, just like the kernel does.

And it is not a user API; it is used between the driver and RTDM only.
How the driver deals with this in its user interface is a different
story. I think there is currently no publicly available driver that maps
I/O space into a user application, thus there is probably no stable RTDM
profile that uses unsigned long to specify a physical address.

> 
> I tried to use rtdm_iomap_to_user() on a kernel module initialization
> section of my RTDM driver and passing NULL to user_info argument. This
> causes an invalid memory access and system panic. How can this
> function be called from kernel intialization code?

Not at all. It is supposed to be called on behalf of a user application,
asking the driver to map some area into its address space. Then you have
a valid user_info at hand.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


  reply	other threads:[~2009-11-18 16:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 16:42 [Xenomai-core] rtdm_iomap_to_user with phys addr > 4GB Herrera-Bendezu, Luis
2009-11-10 17:02 ` Jan Kiszka
2009-11-10 17:58   ` Herrera-Bendezu, Luis
2009-11-10 18:13     ` Jan Kiszka
2009-11-10 18:29       ` Herrera-Bendezu, Luis
2009-11-10 18:54         ` Jan Kiszka
2009-11-10 19:20           ` Herrera-Bendezu, Luis
2009-11-10 21:21             ` Jan Kiszka
2009-11-11 12:38               ` Herrera-Bendezu, Luis
2009-11-11 14:06                 ` Jan Kiszka
2009-11-11 15:40                   ` Herrera-Bendezu, Luis
2009-11-18 16:00                   ` [Xenomai-core] rtdm_iomap_to_user with phys addr > 4G Herrera-Bendezu, Luis
2009-11-18 16:42                     ` Jan Kiszka [this message]
     [not found]                       ` <6FCCA913376DD7488F4139A4D11B8F48FD187B@troe2k1.cs.myharris.net>
2009-11-20 10:35                         ` Jan Kiszka
2009-11-20 16:41                           ` [Xenomai-core] [PATCH] rtdm: Extend rtdm_iomap_to_user to map " Herrera-Bendezu, Luis
2009-11-21  8:43                             ` Jan Kiszka
2009-11-21 15:11                               ` Herrera-Bendezu, Luis
2009-11-23 18:32                                 ` Jan Kiszka

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=4B0423EF.9030307@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=lherrera@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.