All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Egger" <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Cleanup/fix virt_to_maddr
Date: Wed, 24 Jan 2007 10:06:40 +0100	[thread overview]
Message-ID: <200701241006.40587.Christoph.Egger@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]



Hi!

Where virt_to_maddr() or __pa() is used, paddr_t is mostly expected rather
unsigned long. This may fix random issues in PAE mode.

Christoph

[-- Attachment #2: xen_paddr.diff --]
[-- Type: text/x-diff, Size: 663 bytes --]

diff -r bea505a69722 xen/include/asm-x86/page.h
--- a/xen/include/asm-x86/page.h	Tue Jan 23 15:58:05 2007 +0000
+++ b/xen/include/asm-x86/page.h	Wed Jan 24 09:32:26 2007 +0100
@@ -222,7 +222,7 @@ typedef struct { u64 pfn; } pagetable_t;
 
 /* Convert between Xen-heap virtual addresses and machine addresses. */
 #define PAGE_OFFSET         ((unsigned long)__PAGE_OFFSET)
-#define virt_to_maddr(va)   ((unsigned long)(va)-PAGE_OFFSET)
+#define virt_to_maddr(va)   ((paddr_t)(va)-PAGE_OFFSET)
 #define maddr_to_virt(ma)   ((void *)((unsigned long)(ma)+PAGE_OFFSET))
 /* Shorthand versions of the above functions. */
 #define __pa(x)             (virt_to_maddr(x))

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2007-01-24  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24  9:06 Christoph Egger [this message]
2007-01-24 10:48 ` [PATCH] Cleanup/fix virt_to_maddr Keir Fraser
2007-01-24 11:01   ` Christoph Egger
2007-01-24 11:06     ` Keir Fraser

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=200701241006.40587.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.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.