Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm
In directory sc8-pr-cvs1:/tmp/cvs-serv24242
Modified Files:
pagelet_pmd.h
Log Message:
Add description for pmd_index() and clean up pmd_offset()
Index: pagelet_pmd.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mm/pagelet_pmd.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- pagelet_pmd.h 2 Dec 2002 01:08:08 -0000 1.4
+++ pagelet_pmd.h 26 Aug 2003 23:16:40 -0000 1.5
@@ -49,7 +49,12 @@
/* Implemented in arch/vax/mm/pgalloc.c */
void pmd_clear(pmd_t *pmd);
-/* Find an entry in the second-level page table.. */
+/*
+ * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
+ *
+ * this macro returns the index of the entry in the pmd page which would
+ * control the given virtual address
+ */
#define pmd_index(address) ((address >> PMD_SHIFT) & (PTRS_PER_PMD-1))
/* Given an PMD entry (which points to a page of PTEs), return the
@@ -58,11 +63,8 @@
static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
{
- /* locate the pmd entry according to address */
- pmd_t *ptr;
- ptr = dir->pmd + pmd_index(address);
-// printk("pmd_offset: pgd %8p, pmd %p, address %8lx, index %8lx, offset %8p\n",dir,dir->pmd,address,pmd_index(address),ptr);
- return ptr;
+ /* locate the pmd entry according to address */
+ return dir->pmd + pmd_index(address);
}
|