aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2008-12-18 14:41:30 -0500
committerH. Peter Anvin <hpa@zytor.com>2008-12-18 16:30:16 -0500
commit5899329b19100c0b82dc78e9b21ed8b920c9ffb3 (patch)
treeb4601266a9298f119fcf4432492fc0de6a48ca09 /arch/x86/include
parent2ab640379a0ab4cef746ced1d7e04a0941774bcb (diff)
x86: PAT: implement track/untrack of pfnmap regions for x86 - v3
Impact: New mm functionality. Hookup remap_pfn_range and vm_insert_pfn and corresponding copy and free routines with reserve and free tracking. reserve and free here only takes care of non RAM region mapping. For RAM region, driver should use set_memory_[uc|wc|wb] to set the cache type and then setup the mapping for user pte. We can bypass below reserve/free in that case. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include')
-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;