diff -Naur a/mm/memory.c b/mm/memory.c --- a/mm/memory.c Sun Oct 26 14:38:38 2003 +++ b/mm/memory.c Sun Oct 26 14:46:44 2003 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -680,6 +681,24 @@ } +static struct vm_area_struct fixmap_vma = { + /* Catch users - if there are any valid + ones, we can make this be "&init_mm" or + something. */ + .vm_mm = NULL, + .vm_page_prot = PAGE_READONLY, + .vm_flags = VM_READ | VM_EXEC, +}; + +static int init_fixmap_vma(void) +{ + fixmap_vma.vm_start = FIXADDR_START; + fixmap_vma.vm_end = FIXADDR_TOP; + return(0); +} + +__initcall(init_fixmap_vma); + int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int len, int write, int force, struct page **pages, struct vm_area_struct **vmas) @@ -700,19 +719,8 @@ vma = find_extend_vma(mm, start); -#ifdef FIXADDR_USER_START - if (!vma && - start >= FIXADDR_USER_START && start < FIXADDR_USER_END) { - static struct vm_area_struct fixmap_vma = { - /* Catch users - if there are any valid - ones, we can make this be "&init_mm" or - something. */ - .vm_mm = NULL, - .vm_start = FIXADDR_USER_START, - .vm_end = FIXADDR_USER_END, - .vm_page_prot = PAGE_READONLY, - .vm_flags = VM_READ | VM_EXEC, - }; +#ifdef FIXADDR_START + if (!vma && start >= FIXADDR_START && start < FIXADDR_TOP) { unsigned long pg = start & PAGE_MASK; pgd_t *pgd; pmd_t *pmd;