aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorDave McCracken <dmccr@us.ibm.com>2006-09-26 02:31:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 11:48:51 -0400
commit46a82b2d5591335277ed2930611f6acb4ce654ed (patch)
treee90bc1843701af2012bae92564f7109027a8244f /arch/x86_64
parentd2e7b7d0aa021847c59f882b066e7d3812902870 (diff)
[PATCH] Standardize pxx_page macros
One of the changes necessary for shared page tables is to standardize the pxx_page macros. pte_page and pmd_page have always returned the struct page associated with their entry, while pte_page_kernel and pmd_page_kernel have returned the kernel virtual address. pud_page and pgd_page, on the other hand, return the kernel virtual address. Shared page tables needs pud_page and pgd_page to return the actual page structures. There are very few actual users of these functions, so it is simple to standardize their usage. Since this is basic cleanup, I am submitting these changes as a standalone patch. Per Hugh Dickins' comments about it, I am also changing the pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning. Signed-off-by: Dave McCracken <dmccr@us.ibm.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/mm/fault.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index ac8ea66ccb94..4198798e1469 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -299,7 +299,7 @@ static int vmalloc_fault(unsigned long address)
299 if (pgd_none(*pgd)) 299 if (pgd_none(*pgd))
300 set_pgd(pgd, *pgd_ref); 300 set_pgd(pgd, *pgd_ref);
301 else 301 else
302 BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref)); 302 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
303 303
304 /* Below here mismatches are bugs because these lower tables 304 /* Below here mismatches are bugs because these lower tables
305 are shared */ 305 are shared */
@@ -308,7 +308,7 @@ static int vmalloc_fault(unsigned long address)
308 pud_ref = pud_offset(pgd_ref, address); 308 pud_ref = pud_offset(pgd_ref, address);
309 if (pud_none(*pud_ref)) 309 if (pud_none(*pud_ref))
310 return -1; 310 return -1;
311 if (pud_none(*pud) || pud_page(*pud) != pud_page(*pud_ref)) 311 if (pud_none(*pud) || pud_page_vaddr(*pud) != pud_page_vaddr(*pud_ref))
312 BUG(); 312 BUG();
313 pmd = pmd_offset(pud, address); 313 pmd = pmd_offset(pud, address);
314 pmd_ref = pmd_offset(pud_ref, address); 314 pmd_ref = pmd_offset(pud_ref, address);
@@ -641,7 +641,7 @@ void vmalloc_sync_all(void)
641 if (pgd_none(*pgd)) 641 if (pgd_none(*pgd))
642 set_pgd(pgd, *pgd_ref); 642 set_pgd(pgd, *pgd_ref);
643 else 643 else
644 BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref)); 644 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
645 } 645 }
646 spin_unlock(&pgd_lock); 646 spin_unlock(&pgd_lock);
647 set_bit(pgd_index(address), insync); 647 set_bit(pgd_index(address), insync);