diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 14:30:58 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 15:31:49 -0500 |
commit | 3d081b1812bd4de2bbef58c6d598ddf45493010e (patch) | |
tree | 698e5da0c1329ab1dd77ce8f8447e581e54fcba6 /arch | |
parent | 7cfb81024bc1dbe8ad2bf5affd58a6a7ad4172ba (diff) |
x86: unify pud_offset
Impact: cleanup
Unify and demacro pud_offset.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_64.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index a51a97ade636..decccb0a6410 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -506,6 +506,11 @@ static inline unsigned pud_index(unsigned long address) | |||
506 | { | 506 | { |
507 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); | 507 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); |
508 | } | 508 | } |
509 | |||
510 | static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) | ||
511 | { | ||
512 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); | ||
513 | } | ||
509 | #endif /* PAGETABLE_LEVELS > 3 */ | 514 | #endif /* PAGETABLE_LEVELS > 3 */ |
510 | 515 | ||
511 | #endif /* __ASSEMBLY__ */ | 516 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index c17c30f5751a..958dc1e7335e 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -183,8 +183,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; } | |||
183 | #define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE) | 183 | #define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE) |
184 | 184 | ||
185 | /* PUD - Level3 access */ | 185 | /* PUD - Level3 access */ |
186 | #define pud_offset(pgd, address) \ | ||
187 | ((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address))) | ||
188 | 186 | ||
189 | static inline int pud_large(pud_t pte) | 187 | static inline int pud_large(pud_t pte) |
190 | { | 188 | { |