]> err.no Git - linux-2.6/commitdiff
[PATCH] x86_64: Get rid of pud_offset_k / __pud_offset_k
authorAndi Kleen <ak@suse.de>
Mon, 26 Jun 2006 11:57:56 +0000 (13:57 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 17:48:18 +0000 (10:48 -0700)
pud_offset_k() equivalent to pud_offset() now.  Pointed out by Jan Beulich
Similar for __pud_offset_ok, which needs a small change in the callers.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/mm/fault.c
arch/x86_64/mm/init.c
include/asm-x86_64/pgtable.h

index 55250593d8c949a86622315b8f288ba40c8e4444..64728898f869369413e479cba984ace98953f5d0 100644 (file)
@@ -160,7 +160,7 @@ void dump_pagetable(unsigned long address)
        printk("PGD %lx ", pgd_val(*pgd));
        if (!pgd_present(*pgd)) goto ret; 
 
-       pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address);
+       pud = pud_offset(pgd, address);
        if (bad_address(pud)) goto bad;
        printk("PUD %lx ", pud_val(*pud));
        if (!pud_present(*pud)) goto ret;
index a70a8e3e312d0601689c724edbef89b71fc88668..b83645a2e02d7cab9138be0025ff27416069a54d 100644 (file)
@@ -372,7 +372,7 @@ void __meminit init_memory_mapping(unsigned long start, unsigned long end)
                pud_t *pud;
 
                if (after_bootmem)
-                       pud = pud_offset_k(pgd, start & PGDIR_MASK);
+                       pud = pud_offset(pgd, start & PGDIR_MASK);
                else
                        pud = alloc_low_page(&map, &pud_phys);
 
index 31e83c3bd022b315a82799ed4113436954f43a48..a31ab4e68a9bbb4755757210383ed818220ca107 100644 (file)
@@ -337,14 +337,8 @@ static inline int pmd_large(pmd_t pte) {
 /* to find an entry in a page-table-directory. */
 #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
 #define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address))
-#define pud_offset_k(pgd, addr) pud_offset(pgd, addr)
 #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT)
 
-static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address)
-{ 
-       return pud + pud_index(address);
-} 
-
 /* PMD  - Level 2 access */
 #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK))
 #define pmd_page(pmd)          (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))