All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/xen: fix arbitrary_virt_to_machine()
@ 2008-05-15 12:24 Jan Beulich
  2008-05-15 12:58 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2008-05-15 12:24 UTC (permalink / raw)
  To: mingo, Jeremy Fitzhardinge, tglx, hpa; +Cc: linux-kernel

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);
 
 	BUG_ON(pte == NULL);
 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-16 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-05-16 13:00     ` Jeremy Fitzhardinge
2008-05-16 13:06       ` Ingo Molnar

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.