diff -prauN pgcl-2.5.68-1B/include/asm-i386/fixmap.h pgcl-2.5.68-1C/include/asm-i386/fixmap.h --- pgcl-2.5.68-1B/include/asm-i386/fixmap.h 2003-04-27 11:37:43.000000000 -0700 +++ pgcl-2.5.68-1C/include/asm-i386/fixmap.h 2003-04-27 13:09:31.000000000 -0700 @@ -53,7 +53,17 @@ #define LAST_PKMAP_MASK (LAST_PKMAP-1) enum fixed_addresses { - FIX_HOLE, + /* + * leave a hole of exactly PAGE_SIZE at the top for CONFIG_HIGHMEM + * this makes things easier on core code; the math works out funny + */ + FIX_HOLE = PAGE_MMUCOUNT > 1 ? PAGE_MMUCOUNT - 2 : 0, +#ifdef CONFIG_HIGHMEM + FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ + FIX_KMAP_END = FIX_KMAP_BEGIN+((KM_TYPE_NR*NR_CPUS+1)*PAGE_MMUCOUNT)-1, + FIX_PKMAP_BEGIN, + FIX_PKMAP_END = FIX_PKMAP_BEGIN + (LAST_PKMAP+1)*PAGE_MMUCOUNT - 1, +#endif FIX_VSYSCALL, #ifdef CONFIG_X86_LOCAL_APIC FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ @@ -74,12 +84,6 @@ enum fixed_addresses { #ifdef CONFIG_X86_SUMMIT FIX_CYCLONE_TIMER, /*cyclone timer register*/ #endif -#ifdef CONFIG_HIGHMEM - FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ - FIX_KMAP_END = FIX_KMAP_BEGIN+((KM_TYPE_NR*NR_CPUS+1)*PAGE_MMUCOUNT)-1, - FIX_PKMAP_BEGIN, - FIX_PKMAP_END = FIX_PKMAP_BEGIN + (LAST_PKMAP+1)*PAGE_MMUCOUNT - 1, -#endif #ifdef CONFIG_ACPI_BOOT FIX_ACPI_BEGIN, FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, diff -prauN pgcl-2.5.68-1B/mm/memory.c pgcl-2.5.68-1C/mm/memory.c --- pgcl-2.5.68-1B/mm/memory.c 2003-04-27 11:37:43.000000000 -0700 +++ pgcl-2.5.68-1C/mm/memory.c 2003-04-27 13:21:29.000000000 -0700 @@ -1473,19 +1473,9 @@ do_anonymous_page(struct mm_struct *mm, pr_debug("pte vaddr = 0x%lx\n", vaddr); /* - * this will not port to non-x86 - * it computes the offset from the possibly - * non-PAGE_SIZE-aligned kmap_atomic() aperture - * KMAP_END is the highest kmap_atomic() fixmap, - * but __fix_to_virt(KMAP_END) is the lowest vaddr - * A more portable solution needs to be found, - * and it appears that aligning PTE kmap slots - * would suffice. + * this computes the offset from the + * PAGE_SIZE-aligned kmap_atomic() aperture */ -#ifdef CONFIG_HIGHPTE - if (vaddr >= __fix_to_virt(FIX_KMAP_END)) - vaddr -= __fix_to_virt(FIX_KMAP_END); -#endif vaddr &= PAGE_MASK; pr_debug("vaddr offset = 0x%lx\n", vaddr);