From: Ingo Molnar <mingo@elte.hu>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen_alloc_ptpage: cast PFN_PHYS() argument to unsigned long
Date: Thu, 31 Jul 2008 17:11:15 +0200 [thread overview]
Message-ID: <20080731151115.GB32173@elte.hu> (raw)
In-Reply-To: <20080728213209.GF13240@blackpad>
* Eduardo Habkost <ehabkost@redhat.com> wrote:
> Currently paravirt_ops alloc_p*() uses u32 for the pfn args. We should
> change that later, but while the pfn parameter is still u32, we need
> to cast the PFN_PHYS() argument at xen_alloc_ptpage() to unsigned
> long, otherwise it will lose bits on the shift.
>
> I think PFN_PHYS() should behave better when fed with smaller
> integers, but a cast to unsigned long won't be enough for all cases on
> 32-bit PAE, and a cast to u64 would be overkill for most users of
> PFN_PHYS().
>
> We could have two different flavors of PFN_PHYS: one for low pages
> only (unsigned long) and another that works for any page (u64)), but
> while we don't have it, we will need the cast to unsigned long on
> xen_alloc_ptpage().
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
applied to tip/x86/xen - thanks Eduardo.
Ingo
prev parent reply other threads:[~2008-07-31 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 21:32 Eduardo Habkost
2008-07-31 15:11 ` Ingo Molnar [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=20080731151115.GB32173@elte.hu \
--to=mingo@elte.hu \
--cc=ehabkost@redhat.com \
--cc=jeremy@goop.org \
--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
all inboxes | Powered by JetHome®