Index: pgcl-2.6.5-mm6/include/asm-generic/rmap.h =================================================================== --- pgcl-2.6.5-mm6.orig/include/asm-generic/rmap.h 2004-04-03 19:37:24.000000000 -0800 +++ pgcl-2.6.5-mm6/include/asm-generic/rmap.h 2004-04-16 12:21:18.000000000 -0700 @@ -57,7 +57,8 @@ { struct page * page = kmap_atomic_to_page(ptep); unsigned long low_bits; - low_bits = ((unsigned long)ptep & ~PAGE_MASK) * PTRS_PER_PTE; + low_bits = ((unsigned long)ptep & (PTRS_PER_PTE*sizeof(pte_t) - 1)) + * (PAGE_SIZE/sizeof(pte_t)); return page->index + low_bits; }