From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Carl Jones <carl.jones@gmail.com>, xen-devel@lists.xensource.com
Subject: Re: 2.6.27-rc1 >4096MB issue
Date: Tue, 05 Aug 2008 08:52:05 -0700 [thread overview]
Message-ID: <48987725.8060006@goop.org> (raw)
In-Reply-To: <489818C5.76E4.0078.0@novell.com>
Jan Beulich wrote:
>>>> Jeremy Fitzhardinge <jeremy@goop.org> 05.08.08 05:07 >>>
>>>>
>> Subject: make PFN_PHYS explicitly return 64-bit result
>>
>> PFN_PHYS, as its name suggests, turns a pfn into a physical address.
>> However, it is a macro which just operates on its argument without
>> modifying its type. pfns are typed unsigned long, but an unsigned
>> long may not be long enough to hold a physical address (32-bit systems
>> with more than 32 bits of physcial address). This means that the
>> resulting address could be truncated if it doesn't fit within an
>> unsigned long. This isn't generally a problem because most users end
>> up using it for "low" memory, but there's no reason why PFN_PHYS
>> couldn't be used for any possible pfn.
>>
>> Unfortunately there's no univerally recognized type for holding a full
>> physical address, so this patch makes it always return a u64 result.
>>
>
> Couldn't you use resource_size_t here?
Yeah, looks like I can. It had crossed my mind, but I'd vaguely
remembered that it might no be set if you don't have 64-bit IO devices.
But it looks like it's set for all interesting cases (64 bit machines,
and 32-bit x86 PAE).
J
prev parent reply other threads:[~2008-08-05 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-01 3:25 2.6.27-rc1 >4096MB issue Carl Jones
2008-08-01 5:13 ` Jeremy Fitzhardinge
2008-08-02 5:22 ` Carl Jones
2008-08-02 16:00 ` Jeremy Fitzhardinge
2008-08-05 1:00 ` Carl Jones
2008-08-05 3:07 ` Jeremy Fitzhardinge
2008-08-05 4:14 ` Carl Jones
2008-08-05 7:09 ` Jan Beulich
2008-08-05 15:52 ` Jeremy Fitzhardinge [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=48987725.8060006@goop.org \
--to=jeremy@goop.org \
--cc=carl.jones@gmail.com \
--cc=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
/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.