From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jan Beulich <jbeulich@novell.com>,
tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/xen: fix arbitrary_virt_to_machine()
Date: Fri, 16 May 2008 14:09:12 +0200 [thread overview]
Message-ID: <20080516120911.GE11718@elte.hu> (raw)
In-Reply-To: <482C3360.1040309@goop.org>
* Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Jan Beulich wrote:
>> While I realize that the function isn't currently being used, I still
>> think an obvious mistake like this should be corrected.
>>
>> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>>
>> --- a/arch/x86/xen/mmu.c
>> +++ b/arch/x86/xen/mmu.c
>> @@ -60,7 +60,7 @@ xmaddr_t arbitrary_virt_to_machine(unsig
>> {
>> unsigned int level;
>> pte_t *pte = lookup_address(address, &level);
>> - unsigned offset = address & PAGE_MASK;
>> + unsigned offset = address & (PAGE_SIZE - 1);
>>
>
> Yeah. But I'd prefer "~PAGE_MASK".
ok - queued up the patch below in -tip.
Ingo
----------------------->
Subject: x86/xen: fix arbitrary_virt_to_machine()
From: "Jan Beulich" <jbeulich@novell.com>
Date: Thu, 15 May 2008 13:24:52 +0100
While I realize that the function isn't currently being used, I still
think an obvious mistake like this should be corrected.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/xen/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/arch/x86/xen/mmu.c
===================================================================
--- linux.orig/arch/x86/xen/mmu.c
+++ linux/arch/x86/xen/mmu.c
@@ -60,7 +60,7 @@ xmaddr_t arbitrary_virt_to_machine(unsig
{
unsigned int level;
pte_t *pte = lookup_address(address, &level);
- unsigned offset = address & PAGE_MASK;
+ unsigned offset = address & ~PAGE_SIZE;
BUG_ON(pte == NULL);
next prev parent reply other threads:[~2008-05-16 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 12:24 [PATCH] x86/xen: fix arbitrary_virt_to_machine() Jan Beulich
2008-05-15 12:58 ` Jeremy Fitzhardinge
2008-05-16 12:09 ` Ingo Molnar [this message]
2008-05-16 13:00 ` Jeremy Fitzhardinge
2008-05-16 13:06 ` Ingo Molnar
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=20080516120911.GE11718@elte.hu \
--to=mingo@elte.hu \
--cc=hpa@zytor.com \
--cc=jbeulich@novell.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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