aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-01 09:39:42 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-01 09:39:42 +0000
commite44d6d5992257a6d22b19ea8ee76203962e8fe48 (patch)
tree0fb2d04845135d8268029cb196e32d21acfb2543
parent3f6541107dbf7d9aca9cfc481165c5420463c027 (diff)
downloadxen-e44d6d5992257a6d22b19ea8ee76203962e8fe48.tar.gz
xen-e44d6d5992257a6d22b19ea8ee76203962e8fe48.tar.bz2
xen-e44d6d5992257a6d22b19ea8ee76203962e8fe48.zip
bitkeeper revision 1.1159.187.45 (41ad915efwXemCBvpJ9zlx5AhK28qw)
Header and EXPORT_SYMBOL() fixes so that more stuff builds.
-rw-r--r--linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c3
-rw-r--r--linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h11
-rw-r--r--linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h27
-rw-r--r--xen/include/public/xen.h2
4 files changed, 24 insertions, 19 deletions
diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c
index d28a636c77..e055352612 100644
--- a/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c
+++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c
@@ -11,6 +11,7 @@
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/module.h>
#include <asm/io.h>
#include <asm/fixmap.h>
#include <asm/cacheflush.h>
@@ -432,3 +433,5 @@ int direct_remap_area_pages(
return 0;
}
+
+EXPORT_SYMBOL(direct_remap_area_pages);
diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
index c98a6d2933..752a069e8d 100644
--- a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
+++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
@@ -53,15 +53,4 @@ extern void pte_free(struct page *pte);
#define check_pgt_cache() do { } while (0)
-int direct_remap_area_pages(struct mm_struct *mm,
- unsigned long address,
- unsigned long machine_addr,
- unsigned long size,
- pgprot_t prot,
- domid_t domid);
-int __direct_remap_area_pages(struct mm_struct *mm,
- unsigned long address,
- unsigned long size,
- mmu_update_t *v);
-
#endif /* _I386_PGALLOC_H */
diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h
index 1962c630f3..8d2316a4bb 100644
--- a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h
+++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h
@@ -460,14 +460,14 @@ void make_page_writable(void *va);
void make_pages_readonly(void *va, unsigned int nr);
void make_pages_writable(void *va, unsigned int nr);
-static inline unsigned long arbitrary_virt_to_machine(void *va)
-{
- pgd_t *pgd = pgd_offset_k((unsigned long)va);
- pmd_t *pmd = pmd_offset(pgd, (unsigned long)va);
- pte_t *pte = pte_offset_kernel(pmd, (unsigned long)va);
- unsigned long pa = (*(unsigned long *)pte) & PAGE_MASK;
- return pa | ((unsigned long)va & (PAGE_SIZE-1));
-}
+#define arbitrary_virt_to_machine(__va) \
+({ \
+ pgd_t *__pgd = pgd_offset_k((unsigned long)(__va)); \
+ pmd_t *__pmd = pmd_offset(__pgd, (unsigned long)(__va)); \
+ pte_t *__pte = pte_offset_kernel(__pmd, (unsigned long)(__va)); \
+ unsigned long __pa = (*(unsigned long *)__pte) & PAGE_MASK; \
+ __pa | ((unsigned long)(__va) & (PAGE_SIZE-1)); \
+})
#endif /* !__ASSEMBLY__ */
@@ -475,6 +475,17 @@ static inline unsigned long arbitrary_virt_to_machine(void *va)
#define kern_addr_valid(addr) (1)
#endif /* !CONFIG_DISCONTIGMEM */
+int direct_remap_area_pages(struct mm_struct *mm,
+ unsigned long address,
+ unsigned long machine_addr,
+ unsigned long size,
+ pgprot_t prot,
+ domid_t domid);
+int __direct_remap_area_pages(struct mm_struct *mm,
+ unsigned long address,
+ unsigned long size,
+ mmu_update_t *v);
+
#define io_remap_page_range(vma,from,phys,size,prot) \
direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO)
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index 905bd4c011..3f00fe2e06 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -9,8 +9,10 @@
#ifndef __XEN_PUBLIC_XEN_H__
#define __XEN_PUBLIC_XEN_H__
+#ifndef PACKED
/* GCC-specific way to pack structure definitions (no implicit padding). */
#define PACKED __attribute__ ((packed))
+#endif
#if defined(__i386__)
#include "arch-x86_32.h"