ia64/xen: define xen related address conversion
include/asm-ia64/page.h get_order (unsigned long size) · line 233
Quoted 12 lines · [email protected] wrote:
include/asm-ia64/page.h +3
-0@@ -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.
include/asm-ia64/page.h get_order (unsigned long size) · line 237
Quoted 5 lines
include/asm-ia64/page.h +4
-0+ +#ifdef CONFIG_XEN + +#include <asm/xen/page.h>
This shouldn't be necessary; anyone wanting Xen-specific definitions should explicitly include <xen/page.h>.
Quoted 19 lines
include/asm-ia64/page.h +4
-0+ +#endif /* CONFIG_XEN */ +#endif /* __ASSEMBLY__ */ +#endif /*
_ASM_IA64_PAGE_H*/include/asm-ia64/xen/page.h new file +7
-0@@ -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/asm-ia64/xen/page.h line 17
Quoted 10 lines
include/asm-ia64/xen/page.h new file +10
-0+#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
PATCH 21/28 ia64/xen: define xen related address conversion helper functions for domU
Signed-off-by Isaku Yamahata <[email protected]>
--- 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
include/asm-ia64/page.h +11 -0
@@ -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 */
include/asm-ia64/xen/page.h new file +19 -0
@@ -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 */
Signature · 1 line
1.5.3