# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 23cc5f7d71e01bc9908026b0f53e310ece230f60
# Parent  b9e38b262f6479dfa7260fea8efb0dcdc1e6e256
[LINUX][XEN][POWERPC] make sure set_phys_to_machine() asserts out memory model

Currently we run with mfn == pfn, we need to BUG() if any caller
assumes otherwise.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 include/asm-powerpc/xen/asm/hypervisor.h |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -r b9e38b262f64 -r 23cc5f7d71e0 include/asm-powerpc/xen/asm/hypervisor.h
--- a/include/asm-powerpc/xen/asm/hypervisor.h  Sun Oct 08 14:22:12 2006 -0400
+++ b/include/asm-powerpc/xen/asm/hypervisor.h  Mon Oct 09 17:20:44 2006 -0400
@@ -224,7 +224,16 @@ MULTI_update_va_mapping_otherdomain(
 #endif
 }
 
-#define set_phys_to_machine(_x,_y)     do {} while (0)
+#define INVALID_P2M_ENTRY (~0UL)
+#define FOREIGN_FRAME(m) (m)
+static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
+{
+       if (pfn != mfn && mfn != INVALID_P2M_ENTRY)
+               printk(KERN_EMERG "%s: pfn: 0x%lx mfn: 0x%lx\n",
+                      __func__, pfn, mfn);
+       
+       return;
+}
 #define pfn_pte_ma(pfn, prot)  __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 
 typedef unsigned long maddr_t;

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

Reply via email to