Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136794
b: refs/heads/master
c: 7cfb810
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Feb 6, 2009
1 parent cc786cd commit 3137415
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 777cba16aac5a1096db0b936912eb7fd06fb0cc5
refs/heads/master: 7cfb81024bc1dbe8ad2bf5affd58a6a7ad4172ba
6 changes: 6 additions & 0 deletions trunk/arch/x86/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ static inline struct page *pgd_page(pgd_t pgd)
{
return pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT);
}

/* to find an entry in a page-table-directory. */
static inline unsigned pud_index(unsigned long address)
{
return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
}
#endif /* PAGETABLE_LEVELS > 3 */

#endif /* __ASSEMBLY__ */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/pgtable_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)

/* PUD - Level3 access */
/* 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_vaddr(*(pgd)) + pud_index((address)))

Expand Down

0 comments on commit 3137415

Please sign in to comment.