|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [IA64] split parts of page.h into maddr.h
# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 5264cc30d711ab7ba0e1c252853a4dba6faa7fa9
# Parent 8293018c1a24154f8f6c7aef6c07310afd4f64c6
[IA64] split parts of page.h into maddr.h
ia64 support for xen-unstable.hg cset 11081:9c953e1b6fad
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
linux-2.6-xen-sparse/include/asm-ia64/maddr.h | 81 ++++++++++++++++++++++++++
linux-2.6-xen-sparse/include/asm-ia64/page.h | 66 ---------------------
2 files changed, 82 insertions(+), 65 deletions(-)
diff -r 8293018c1a24 -r 5264cc30d711
linux-2.6-xen-sparse/include/asm-ia64/page.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/page.h Wed Aug 23 11:14:52
2006 -0600
+++ b/linux-2.6-xen-sparse/include/asm-ia64/page.h Wed Aug 23 11:15:29
2006 -0600
@@ -224,12 +224,9 @@ get_order (unsigned long size)
#ifndef __ASSEMBLY__
#ifdef CONFIG_XEN
-#define INVALID_P2M_ENTRY (~0UL)
-
#include <linux/kernel.h>
#include <asm/hypervisor.h>
#include <xen/features.h> // to compile netback, netfront
-typedef unsigned long maddr_t; // to compile netback, netfront
/*
* XXX hack!
@@ -268,68 +265,7 @@ extern struct address_space xen_ia64_for
})
#define HAVE_ARCH_FREE_PAGE
-/* XXX xen page size != page size */
-
-static inline unsigned long
-pfn_to_mfn_for_dma(unsigned long pfn)
-{
- unsigned long mfn;
- mfn = HYPERVISOR_phystomach(pfn);
- BUG_ON(mfn == 0); // XXX
- BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX
- BUG_ON(mfn == INVALID_MFN);
- return mfn;
-}
-
-static inline unsigned long
-phys_to_machine_for_dma(unsigned long phys)
-{
- unsigned long machine =
- pfn_to_mfn_for_dma(phys >> PAGE_SHIFT) << PAGE_SHIFT;
- machine |= (phys & ~PAGE_MASK);
- return machine;
-}
-
-static inline unsigned long
-mfn_to_pfn_for_dma(unsigned long mfn)
-{
- unsigned long pfn;
- pfn = HYPERVISOR_machtophys(mfn);
- BUG_ON(pfn == 0);
- //BUG_ON(pfn == INVALID_M2P_ENTRY);
- return pfn;
-}
-
-static inline unsigned long
-machine_to_phys_for_dma(unsigned long machine)
-{
- unsigned long phys =
- mfn_to_pfn_for_dma(machine >> PAGE_SHIFT) << PAGE_SHIFT;
- phys |= (machine & ~PAGE_MASK);
- return phys;
-}
-
-#define set_phys_to_machine(pfn, mfn) do { } while (0)
-#define xen_machphys_update(mfn, pfn) do { } while (0)
-
-/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */
-#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY)
-
-#define mfn_to_pfn(mfn) (mfn)
-#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
-#define pfn_to_mfn(pfn) (pfn)
-#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
-#define virt_to_machine(virt) __pa(virt) // for tpmfront.c
-
-static inline unsigned long
-mfn_to_local_pfn(unsigned long mfn)
-{
- extern unsigned long max_mapnr;
- unsigned long pfn = mfn_to_pfn_for_dma(mfn);
- if (!pfn_valid(pfn))
- return INVALID_P2M_ENTRY;
- return pfn;
-}
+#include <asm/maddr.h>
#endif /* CONFIG_XEN */
#endif /* __ASSEMBLY__ */
diff -r 8293018c1a24 -r 5264cc30d711
linux-2.6-xen-sparse/include/asm-ia64/maddr.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h Wed Aug 23 11:15:29
2006 -0600
@@ -0,0 +1,81 @@
+#ifndef _ASM_IA64_MADDR_H
+#define _ASM_IA64_MADDR_H
+
+#ifndef __ASSEMBLY__
+#ifdef CONFIG_XEN
+
+#define INVALID_P2M_ENTRY (~0UL)
+
+#include <linux/kernel.h>
+#include <asm/hypervisor.h>
+#include <xen/features.h> // to compile netback, netfront
+typedef unsigned long maddr_t; // to compile netback, netfront
+
+
+/* XXX xen page size != page size */
+
+static inline unsigned long
+pfn_to_mfn_for_dma(unsigned long pfn)
+{
+ unsigned long mfn;
+ mfn = HYPERVISOR_phystomach(pfn);
+ BUG_ON(mfn == 0); // XXX
+ BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX
+ BUG_ON(mfn == INVALID_MFN);
+ return mfn;
+}
+
+static inline unsigned long
+phys_to_machine_for_dma(unsigned long phys)
+{
+ unsigned long machine =
+ pfn_to_mfn_for_dma(phys >> PAGE_SHIFT) << PAGE_SHIFT;
+ machine |= (phys & ~PAGE_MASK);
+ return machine;
+}
+
+static inline unsigned long
+mfn_to_pfn_for_dma(unsigned long mfn)
+{
+ unsigned long pfn;
+ pfn = HYPERVISOR_machtophys(mfn);
+ BUG_ON(pfn == 0);
+ //BUG_ON(pfn == INVALID_M2P_ENTRY);
+ return pfn;
+}
+
+static inline unsigned long
+machine_to_phys_for_dma(unsigned long machine)
+{
+ unsigned long phys =
+ mfn_to_pfn_for_dma(machine >> PAGE_SHIFT) << PAGE_SHIFT;
+ phys |= (machine & ~PAGE_MASK);
+ return phys;
+}
+
+#define set_phys_to_machine(pfn, mfn) do { } while (0)
+#define xen_machphys_update(mfn, pfn) do { } while (0)
+
+/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */
+#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY)
+
+#define mfn_to_pfn(mfn) (mfn)
+#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
+#define pfn_to_mfn(pfn) (pfn)
+#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
+#define virt_to_machine(virt) __pa(virt) // for tpmfront.c
+
+static inline unsigned long
+mfn_to_local_pfn(unsigned long mfn)
+{
+ extern unsigned long max_mapnr;
+ unsigned long pfn = mfn_to_pfn_for_dma(mfn);
+ if (!pfn_valid(pfn))
+ return INVALID_P2M_ENTRY;
+ return pfn;
+}
+
+#endif /* CONFIG_XEN */
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_IA64_MADDR_H */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [IA64] split parts of page.h into maddr.h,
Xen patchbot-unstable <=
|
|
|
|
|