aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r--arch/x86/include/asm/pgtable.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index c012f3b11671..7dcd94c29044 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -219,6 +219,11 @@ static inline unsigned long pte_pfn(pte_t pte)
219 return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; 219 return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT;
220} 220}
221 221
222static inline u64 pte_pa(pte_t pte)
223{
224 return pte_val(pte) & PTE_PFN_MASK;
225}
226
222#define pte_page(pte) pfn_to_page(pte_pfn(pte)) 227#define pte_page(pte) pfn_to_page(pte_pfn(pte))
223 228
224static inline int pmd_large(pmd_t pte) 229static inline int pmd_large(pmd_t pte)
@@ -328,6 +333,11 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
328 333
329#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) 334#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
330 335
336/* Indicate that x86 has its own track and untrack pfn vma functions */
337#define track_pfn_vma_new track_pfn_vma_new
338#define track_pfn_vma_copy track_pfn_vma_copy
339#define untrack_pfn_vma untrack_pfn_vma
340
331#ifndef __ASSEMBLY__ 341#ifndef __ASSEMBLY__
332#define __HAVE_PHYS_MEM_ACCESS_PROT 342#define __HAVE_PHYS_MEM_ACCESS_PROT
333struct file; 343struct file;