IA64 nested_dtlb handler fix up comments Add some comments that hopefully help to understand the code better Signed-off-by: Christoph Lameter Index: linux-2.6.18-mm3/arch/ia64/kernel/ivt.S =================================================================== --- linux-2.6.18-mm3.orig/arch/ia64/kernel/ivt.S 2006-10-08 17:59:23.652378637 -0700 +++ linux-2.6.18-mm3/arch/ia64/kernel/ivt.S 2006-10-08 18:15:26.611662500 -0700 @@ -437,30 +437,30 @@ ENTRY(nested_dtlb_miss) */ rsm psr.dt // switch to using physical data addressing mov r19=IA64_KR(PT_BASE) // get the page table base address - shl r21=r16,3 // shift bit 60 into sign bit + shl r21=r16,3 // Clear region bits mov r18=cr.itir ;; shr.u r17=r16,61 // get the region number into r17 extr.u r18=r18,2,6 // get the faulting page size ;; cmp.eq p6,p7=5,r17 // is faulting address in region 5? - add r22=-PAGE_SHIFT,r18 // adjustment for hugetlb address - add r18=PGDIR_SHIFT-PAGE_SHIFT+3,r18 + add r22=-PAGE_SHIFT,r18 // page order + add r18=PGDIR_SHIFT-PAGE_SHIFT+3,r18 // Shift to get to PGD pointer number. ;; - shr.u r22=r16,r22 - shr.u r18=r21,r18 + shr.u r22=r16,r22 // address >> page order + shr.u r18=r21,r18 // PGD pointer number (p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place srlz.d LOAD_PHYSICAL(p6, r19, swapper_pg_dir) // region 5 is rooted at swapper_pg_dir .pred.rel "mutex", p6, p7 -(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT -(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 +(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT // Kernel can use full size +(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 // User space requires region bits ;; (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] - cmp.eq p7,p6=0,r21 // unused address bits all zeroes? + cmp.eq p7,p6=r0,r21 // unused address bits all zeroes? #ifdef CONFIG_PGTABLE_4 shr.u r18=r22,PUD_SHIFT // shift pud index into position #else