Index: linux-2.6.18-mm3/arch/ia64/mm/init.c =================================================================== --- linux-2.6.18-mm3.orig/arch/ia64/mm/init.c 2006-10-09 02:29:22.734774195 -0700 +++ linux-2.6.18-mm3/arch/ia64/mm/init.c 2006-10-09 02:40:13.481741199 -0700 @@ -487,10 +487,10 @@ create_mem_map_page_table (u64 start, u6 node = paddr_to_nid(__pa(start)); for (address = start_page; address < end_page; address += VIRTUAL_MEM_MAP_PAGE_SIZE) { -#ifdef VIRTUAL_MEM_MAP_HUGE +#ifdef CONFIG_VIRTUAL_MEM_MAP_HUGE unsigned long taddr = VIRTMM_PAGE_TO_PAGE(address); - pgd = pgd_offset_mm(taddr); + pgd = pgd_offset_memmap(taddr); #else unsigned long taddr = address; pgd = pgd_offset_k(taddr); Index: linux-2.6.18-mm3/arch/ia64/kernel/ivt.S =================================================================== --- linux-2.6.18-mm3.orig/arch/ia64/kernel/ivt.S 2006-10-09 02:28:01.422406907 -0700 +++ linux-2.6.18-mm3/arch/ia64/kernel/ivt.S 2006-10-09 03:47:53.456041691 -0700 @@ -429,7 +429,9 @@ ENTRY(nested_dtlb_miss) mov r19=IA64_KR(PT_BASE) // get the page table base address mov r18=cr.itir shr.u r17=r16,61 // get the region number into r17 - tbit.nz p9,p0=r16,IA64_RGN_MAP_SHIFT // Check for virtual MMAP flag set + tbit.nz p9,p0=r16,1 << (PGDIR_SHIFT+PAGE_SHIFT-3) + tbit.nz.or p9,p0=r16,1 << (PGDIR_SHIFT+PAGE_SHIFT-2) + tbit.nz.or p9,p0=r16,1 << (PGDIR_SHIFT+PAGE_SHIFT-1) (p9) br.cond.spnt memmap // Do potentially necessary mmap processing srlz.d ;; @@ -510,13 +512,28 @@ ENTRY(memmap) mov r22=r18 (p9) br.cond.spnt nested_dtlb_cont ;; - mov r18=IA64_VIRTUAL_MEM_MAP_PAGE_SHIFT + dep.z r18=r16, VIRTUAL_MEM_PAGE_SHIFT, 3 + shl r18=r18,1 /* x2 */ + add r18=r18,14 /* 4K base */ +// +// 0 = (invalid) +// 1 = 16 = 2 64k +// 2 = 18 = 4 256k +// 3 = 20 = 6 1M +// 4 = 22 = 4M +// 5 = 24 = 16M +// 6 = 26 = 256M +// 7 = 28 = 1G +// + +mov r18=IA64_VIRTUAL_MEM_MAP_PAGE_SHIFT dep r16=0,r16,IA64_RGN_MAP_SHIFT,1 // Clear VIRTUAL_MEM_MAP flag cmp.eq p6,p7=r0,r0 // Set proper flags for kernel map processing ;; dep r22=r18,r22,2,6 // Fix up the page size LOAD_PHYSICAL(p0, r19, memmap_pg_dir) // Get the right page table ;; + add r19,size_selector * PAGE_SIZE / 8. mov cr.itir=r22 // Set it up for the next itc br.sptk.many nested_dtlb END(memmap)