From: William Lee Irwin III <wli@holomorphy.com>
To: John Fusco <fusco_john@yahoo.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [vm 0/4] replace remap_page_range() with remap_pfn_range()
Date: Thu, 23 Sep 2004 20:29:28 -0700 [thread overview]
Message-ID: <20040924032928.GR9106@holomorphy.com> (raw)
In-Reply-To: <20040924021735.GL9106@holomorphy.com>
On Thu, Sep 23, 2004 at 06:22:22PM -0500, John Fusco wrote:
>> Everything worked great until we decided that we needed to install 6GB
>> in this system. The problem is that remap_page_range() uses an unsigned
>> long as the parameter for a physical address. On IA32, an unsigned long
>> is 32-bits, but the IA32 is capable of addressing well over 4GB of RAM.
>> So physical addresses on IA32 must be larger than 32 bits.
On Thu, Sep 23, 2004 at 07:17:35PM -0700, William Lee Irwin III wrote:
> Do these patches work for you? Compiletested on sparc64.
Long-format changelog:
Resolve physical address overflow issue in the remap_page_range() API
by replacing it with remap_pfn_range(), which accepts its physical
address argument as a pfn, hence allowing the use of a single-precision
physical address argument without the risk of overflow at the API
boundary. The above issue has hobbled support for various 32-bit
architectures, including some embedded systems (ppc440 IIRC), caused
persistent portability issues for sound drivers for legacy systems
(sparc32; unfortunately this patch alone does not fully resolve those),
and according to John Fusco's reports, made drivers for some PCI-X
hardware infeasible to port to recent ia32 PAE enterprise systems. With
this patch series applied, physical address overflows on 32-bit systems
caused directly by remap_page_range() are gone forever, and ca. 100LOC
of cut-and-waste driver code are swept out of existence alongside them.
-- wli
P.S.: The existing solution to the sparc32 issue was to pass a double
precision representation of the physical address as 2 single-
precision arguments in an API (io_remap_page_range()) whose
argument corresponding to those two was a single single-
precision argument on most/all other architectures. The
sparc32-specific issue requires more work beyond these patches
to rectify. The most apparent consequence of the API skew is
that drivers don't compile on sparc32 when they use
io_remap_page_range() due to passing insufficient arguments,
or vice-versa for drivers originally written for sparc32.
prev parent reply other threads:[~2004-09-24 3:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <41535AAE.6090700@yahoo.com>
2004-09-24 2:17 ` [vm 0/4] replace remap_page_range() with remap_pfn_range() William Lee Irwin III
2004-09-24 2:19 ` [vm 1/4] convert remap_page_range() to remap_pfn_range() William Lee Irwin III
2004-09-24 2:21 ` [vm 2/4] convert io_remap_page_range() to call remap_pfn_range() William Lee Irwin III
2004-09-24 2:23 ` [vm 3/4] convert direct callers of remap_page_range() William Lee Irwin III
2004-09-24 2:25 ` [vm 4/4] remove remap_page_range() William Lee Irwin III
2004-09-24 2:27 ` [vm 3/4] convert direct callers of remap_page_range() William Lee Irwin III
2004-09-24 3:29 ` William Lee Irwin III [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=20040924032928.GR9106@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=fusco_john@yahoo.com \
--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