aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/pgtable.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-12-06 17:31:30 -0500
committerLen Brown <len.brown@intel.com>2005-12-06 17:31:30 -0500
commit3d5271f9883cba7b54762bc4fe027d4172f06db7 (patch)
treeab8a881a14478598a0c8bda0d26c62cdccfffd6d /include/asm-x86_64/pgtable.h
parent378b2556f4e09fa6f87ff0cb5c4395ff28257d02 (diff)
parent9115a6c787596e687df03010d97fccc5e0762506 (diff)
Pull release into acpica branch
Diffstat (limited to 'include/asm-x86_64/pgtable.h')
-rw-r--r--include/asm-x86_64/pgtable.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index 2cb483516459..ecf58c7c1650 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -16,6 +16,7 @@ extern pud_t level3_physmem_pgt[512];
16extern pud_t level3_ident_pgt[512]; 16extern pud_t level3_ident_pgt[512];
17extern pmd_t level2_kernel_pgt[512]; 17extern pmd_t level2_kernel_pgt[512];
18extern pgd_t init_level4_pgt[]; 18extern pgd_t init_level4_pgt[];
19extern pgd_t boot_level4_pgt[];
19extern unsigned long __supported_pte_mask; 20extern unsigned long __supported_pte_mask;
20 21
21#define swapper_pg_dir init_level4_pgt 22#define swapper_pg_dir init_level4_pgt
@@ -105,6 +106,8 @@ static inline void pgd_clear (pgd_t * pgd)
105 106
106#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) 107#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0))
107 108
109struct mm_struct;
110
108static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) 111static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full)
109{ 112{
110 pte_t pte; 113 pte_t pte;
@@ -245,7 +248,7 @@ static inline unsigned long pud_bad(pud_t pud)
245#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) /* FIXME: is this 248#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) /* FIXME: is this
246 right? */ 249 right? */
247#define pte_page(x) pfn_to_page(pte_pfn(x)) 250#define pte_page(x) pfn_to_page(pte_pfn(x))
248#define pte_pfn(x) ((pte_val(x) >> PAGE_SHIFT) & __PHYSICAL_MASK) 251#define pte_pfn(x) ((pte_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT)
249 252
250static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) 253static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
251{ 254{
@@ -318,8 +321,6 @@ static inline int pmd_large(pmd_t pte) {
318 * and a page entry and page directory to the page they refer to. 321 * and a page entry and page directory to the page they refer to.
319 */ 322 */
320 323
321#define page_pte(page) page_pte_prot(page, __pgprot(0))
322
323/* 324/*
324 * Level 4 access. 325 * Level 4 access.
325 */ 326 */
@@ -354,7 +355,7 @@ static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address)
354#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) 355#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
355#define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE ) 356#define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE )
356#define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot))) 357#define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot)))
357#define pmd_pfn(x) ((pmd_val(x) >> PAGE_SHIFT) & __PHYSICAL_MASK) 358#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT)
358 359
359#define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) 360#define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
360#define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE }) 361#define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE })
@@ -384,7 +385,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
384} 385}
385 386
386#define pte_index(address) \ 387#define pte_index(address) \
387 ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 388 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
388#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_kernel(*(dir)) + \ 389#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_kernel(*(dir)) + \
389 pte_index(address)) 390 pte_index(address))
390 391