source:
trunk/packages/xen-3.1/xen-3.1/patches/linux-2.6.18/fixaddr-top.patch
@
34
Last change on this file since 34 was 34, checked in by hartmans, 18 years ago | |
---|---|
|
|
File size: 2.4 KB |
-
arch/i386/mm/pgtable.c
diff -pruN ../orig-linux-2.6.18/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
old new 12 12 #include <linux/slab.h> 13 13 #include <linux/pagemap.h> 14 14 #include <linux/spinlock.h> 15 #include <linux/module.h> 15 16 16 17 #include <asm/system.h> 17 18 #include <asm/pgtable.h> … … void set_pmd_pfn(unsigned long vaddr, un 137 138 __flush_tlb_one(vaddr); 138 139 } 139 140 141 static int nr_fixmaps = 0; 142 unsigned long __FIXADDR_TOP = 0xfffff000; 143 EXPORT_SYMBOL(__FIXADDR_TOP); 144 140 145 void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) 141 146 { 142 147 unsigned long address = __fix_to_virt(idx); … … void __set_fixmap (enum fixed_addresses 146 151 return; 147 152 } 148 153 set_pte_pfn(address, phys >> PAGE_SHIFT, flags); 154 nr_fixmaps++; 155 } 156 157 void set_fixaddr_top(unsigned long top) 158 { 159 BUG_ON(nr_fixmaps > 0); 160 __FIXADDR_TOP = top - PAGE_SIZE; 149 161 } 150 162 151 163 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) -
include/asm-i386/fixmap.h
diff -pruN ../orig-linux-2.6.18/include/asm-i386/fixmap.h ./include/asm-i386/fixmap.h
old new 19 19 * Leave one empty page between vmalloc'ed areas and 20 20 * the start of the fixmap. 21 21 */ 22 #define __FIXADDR_TOP 0xfffff000 22 extern unsigned long __FIXADDR_TOP; 23 23 24 24 #ifndef __ASSEMBLY__ 25 25 #include <linux/kernel.h> … … enum fixed_addresses { 94 94 extern void __set_fixmap (enum fixed_addresses idx, 95 95 unsigned long phys, pgprot_t flags); 96 96 97 extern void set_fixaddr_top(unsigned long top); 98 97 99 #define set_fixmap(idx, phys) \ 98 100 __set_fixmap(idx, phys, PAGE_KERNEL) 99 101 /* -
include/asm-i386/page.h
diff -pruN ../orig-linux-2.6.18/include/asm-i386/page.h ./include/asm-i386/page.h
old new extern int page_is_ram(unsigned long pag 122 122 123 123 #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) 124 124 #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) 125 #define MAXMEM ( -__PAGE_OFFSET-__VMALLOC_RESERVE)125 #define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) 126 126 #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) 127 127 #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) 128 128 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
Note: See TracBrowser
for help on using the repository browser.