All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 21/28] ia64/xen: define xen related address conversion
@ 2008-02-21 23:45 Jeremy Fitzhardinge
  2008-02-22  5:10 ` [PATCH 21/28] ia64/xen: define xen related address conversion helper functions for domU Isaku Yamahata
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2008-02-21 23:45 UTC (permalink / raw)
  To: linux-ia64

yamahata@valinux.co.jp wrote:
> diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
> index 4999a6c..effd2af 100644
> --- a/include/asm-ia64/page.h
> +++ b/include/asm-ia64/page.h
> @@ -227,4 +227,15 @@ get_order (unsigned long size)
>  					 (((current->personality & READ_IMPLIES_EXEC) != 0)	\
>  					  ? VM_EXEC : 0))
>  
> +#ifndef __ASSEMBLY__
> +
> +#include <linux/kernel.h>
>   

Why?  asm-ia64/xen/page.h already includes this.

> +
> +#ifdef CONFIG_XEN
> +
> +#include <asm/xen/page.h>
>   

This shouldn't be necessary; anyone wanting Xen-specific definitions 
should explicitly include <xen/page.h>.

> +
> +#endif /* CONFIG_XEN */
> +#endif /* __ASSEMBLY__ */
> +
>  #endif /* _ASM_IA64_PAGE_H */
> diff --git a/include/asm-ia64/xen/page.h b/include/asm-ia64/xen/page.h
> new file mode 100644
> index 0000000..9ab8148
> --- /dev/null
> +++ b/include/asm-ia64/xen/page.h
> @@ -0,0 +1,19 @@
> +#ifndef _ASM_IA64_MADDR_H
> +#define _ASM_IA64_MADDR_H
> +
> +#include <linux/kernel.h>
> +#include <asm/xen/hypervisor.h>
> +#include <asm/xen/hypercall.h>
> +#include <xen/features.h>
> +#include <xen/interface/xen.h>
> +
> +#define mfn_to_pfn(mfn) (mfn)
> +#define pfn_to_mfn(pfn) (pfn)
> +
> +#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
> +#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
> +#define virt_to_machine(virt) __pa(virt) /* for tpmfront.c */
> +
> +#define set_phys_to_machine(pfn, mfn) do { } while (0)
>   

Probably worth turning these into inlines so that they get properly 
typechecked.  Especially things like set_phys_to_machine(), which 
doesn't use its arguments.

    J

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

* [PATCH 21/28] ia64/xen: define xen related address conversion helper functions for domU
  2008-02-21 23:45 [PATCH 21/28] ia64/xen: define xen related address conversion Jeremy Fitzhardinge
@ 2008-02-22  5:10 ` Isaku Yamahata
  0 siblings, 0 replies; 2+ messages in thread
From: Isaku Yamahata @ 2008-02-22  5:10 UTC (permalink / raw)
  To: linux-ia64


Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 include/asm-ia64/page.h     |   11 +++++++++++
 include/asm-ia64/xen/page.h |   19 +++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-ia64/xen/page.h

diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 4999a6c..effd2af 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -227,4 +227,15 @@ get_order (unsigned long size)
 					 (((current->personality & READ_IMPLIES_EXEC) != 0)	\
 					  ? VM_EXEC : 0))
 
+#ifndef __ASSEMBLY__
+
+#include <linux/kernel.h>
+
+#ifdef CONFIG_XEN
+
+#include <asm/xen/page.h>
+
+#endif /* CONFIG_XEN */
+#endif /* __ASSEMBLY__ */
+
 #endif /* _ASM_IA64_PAGE_H */
diff --git a/include/asm-ia64/xen/page.h b/include/asm-ia64/xen/page.h
new file mode 100644
index 0000000..9ab8148
--- /dev/null
+++ b/include/asm-ia64/xen/page.h
@@ -0,0 +1,19 @@
+#ifndef _ASM_IA64_MADDR_H
+#define _ASM_IA64_MADDR_H
+
+#include <linux/kernel.h>
+#include <asm/xen/hypervisor.h>
+#include <asm/xen/hypercall.h>
+#include <xen/features.h>
+#include <xen/interface/xen.h>
+
+#define mfn_to_pfn(mfn) (mfn)
+#define pfn_to_mfn(pfn) (pfn)
+
+#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT))
+#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT)
+#define virt_to_machine(virt) __pa(virt) /* for tpmfront.c */
+
+#define set_phys_to_machine(pfn, mfn) do { } while (0)
+
+#endif /* _ASM_IA64_MADDR_H */
-- 
1.5.3


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

end of thread, other threads:[~2008-02-22  5:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 23:45 [PATCH 21/28] ia64/xen: define xen related address conversion Jeremy Fitzhardinge
2008-02-22  5:10 ` [PATCH 21/28] ia64/xen: define xen related address conversion helper functions for domU Isaku Yamahata

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.