public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hans J. Koch" <hjk@linutronix.de>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: "Hans J. Koch" <hjk@linutronix.de>, Greg KH <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org List"
	<linux-kernel@vger.kernel.org>
Subject: Re: UIO support for >32-bit physical addresses on 32-bit platforms
Date: Wed, 24 Feb 2010 14:47:32 +0100	[thread overview]
Message-ID: <20100224134732.GB1931@local> (raw)
In-Reply-To: <554C9C89-9D0A-4307-AC4D-CD67F41A53B7@kernel.crashing.org>

On Tue, Feb 23, 2010 at 09:24:42PM -0600, Kumar Gala wrote:
> > Well, UIO is (up to now) completely independent of the architecture. If you've
> > got a good idea how to implement such mappings, feel free to come up with your
> > suggestions/patches. Just changing struct uio_mem.addr to u64 is certainly not
> > enough.
> > 
> > I'll give it some thoughts myself, and will discuss the problem with friends,
> > maybe there's a nice solution. Help from your side is much appreciated.
> 
> For my needs I believe changing uio_mem.addr to a u64 is sufficient for getting UIO_MEM_PHYS to work for the physical address being above 4G.  I need the type to be large to represent a wider PFN range.  Obviously there are limitations (ie, we can't make an IO region >4G in size, etc.)
> 

Hmm, after some research it seems you're right. But the type for the addr
member of struct uio_mem should be phys_addr_t, not u64. phys_addr_t is
an u64 on systems that support it, and an u32 otherwise.

It'll probably work with UIO_MEM_LOGICAL and UIO_MEM_VIRTUAL as well.

Could you hack up a patch to that effect, and test it? If it works for you,
I think we should apply it.

Thanks for pointing this out.

Hans

> - k

      reply	other threads:[~2010-02-24 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 14:54 UIO support for >32-bit physical addresses on 32-bit platforms Kumar Gala
2010-02-23 15:01 ` Greg KH
2010-02-23 19:49   ` Hans J. Koch
2010-02-23 22:52     ` Kumar Gala
2010-02-23 23:39       ` Hans J. Koch
2010-02-24  3:24         ` Kumar Gala
2010-02-24 13:47           ` Hans J. Koch [this message]

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=20100224134732.GB1931@local \
    --to=hjk@linutronix.de \
    --cc=galak@kernel.crashing.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox