Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136802
b: refs/heads/master
c: 97e2817
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Feb 6, 2009
1 parent 24d3f17 commit a4b8ff2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 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: 3180fba0eec0d14e4ac8183a90d643d0d3383c75
refs/heads/master: 97e2817d3423d753fd2f80ea936a370032846382
9 changes: 9 additions & 0 deletions trunk/arch/x86/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,15 @@ static inline unsigned pmd_index(unsigned long address)
return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
}

/*
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.
*
* (Currently stuck as a macro because of indirect forward reference
* to linux/mm.h:page_to_nid())
*/
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))

#if PAGETABLE_LEVELS > 2
static inline int pud_present(pud_t pud)
{
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/x86/include/asm/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,6 @@ extern unsigned long pg0[];
# include <asm/pgtable-2level.h>
#endif

/*
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.
*/
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))


static inline int pud_large(pud_t pud) { return 0; }

/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/include/asm/pgtable_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ static inline int pud_large(pud_t pte)

/* PTE - Level 1 access. */

/* page, protection -> pte */
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn((page)), (pgprot))

#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
pte_index((address)))
Expand Down

0 comments on commit a4b8ff2

Please sign in to comment.