[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix non-xen build for: Make the fixmap area moveable in kernel address space.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID e480a5db8abbc9c4808e00b5cfc6dd40c6063d48
# Parent  bf594e88f0467520b7b646ffe3e862c6ca335bf6
Fix non-xen build for: Make the fixmap area moveable in kernel address space.

From: Gerd Hoffmann <kraxel@xxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r bf594e88f046 -r e480a5db8abb linux-2.6-xen-sparse/arch/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable.c       Mon Feb 27 10:31:30 2006
+++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable.c       Mon Feb 27 10:34:03 2006
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/pagemap.h>
 #include <linux/spinlock.h>
+#include <linux/module.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -138,6 +139,10 @@
        __flush_tlb_one(vaddr);
 }
 
+static int nr_fixmaps = 0;
+unsigned long __FIXADDR_TOP = 0xfffff000;
+EXPORT_SYMBOL(__FIXADDR_TOP);
+
 void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t 
flags)
 {
        unsigned long address = __fix_to_virt(idx);
@@ -147,6 +152,13 @@
                return;
        }
        set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
+       nr_fixmaps++;
+}
+
+void set_fixaddr_top(unsigned long top)
+{
+       BUG_ON(nr_fixmaps > 0);
+       __FIXADDR_TOP = top - PAGE_SIZE;
 }
 
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
diff -r bf594e88f046 -r e480a5db8abb 
linux-2.6-xen-sparse/include/asm-i386/fixmap.h
--- a/linux-2.6-xen-sparse/include/asm-i386/fixmap.h    Mon Feb 27 10:31:30 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/fixmap.h    Mon Feb 27 10:34:03 2006
@@ -20,7 +20,7 @@
  * Leave one empty page between vmalloc'ed areas and
  * the start of the fixmap.
  */
-#define __FIXADDR_TOP  0xfffff000
+extern unsigned long __FIXADDR_TOP;
 
 #ifndef __ASSEMBLY__
 #include <linux/kernel.h>
@@ -94,6 +94,8 @@
 extern void __set_fixmap (enum fixed_addresses idx,
                                        unsigned long phys, pgprot_t flags);
 
+extern void set_fixaddr_top(unsigned long top);
+
 #define set_fixmap(idx, phys) \
                __set_fixmap(idx, phys, PAGE_KERNEL)
 /*
diff -r bf594e88f046 -r e480a5db8abb 
linux-2.6-xen-sparse/include/asm-i386/page.h
--- a/linux-2.6-xen-sparse/include/asm-i386/page.h      Mon Feb 27 10:31:30 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/page.h      Mon Feb 27 10:34:03 2006
@@ -121,7 +121,7 @@
 
 #define PAGE_OFFSET            ((unsigned long)__PAGE_OFFSET)
 #define VMALLOC_RESERVE                ((unsigned long)__VMALLOC_RESERVE)
-#define MAXMEM                 (-__PAGE_OFFSET-__VMALLOC_RESERVE)
+#define MAXMEM                 (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE)
 #define __pa(x)                        ((unsigned long)(x)-PAGE_OFFSET)
 #define __va(x)                        ((void *)((unsigned 
long)(x)+PAGE_OFFSET))
 #define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.