aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgtable.h
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2008-03-18 20:00:20 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-24 17:40:47 -0400
commitf0970c13b6a5b01189aeb196ebb573cf87d95839 (patch)
treec33836b693ca066c19dc8986165aee5849fbcdd9 /include/asm-x86/pgtable.h
parente045fb2a988a9a1964059b0d33dbaf18d12f925f (diff)
x86: PAT phys_mem_access_prot_allowed for dev/mem mmap
Introduce phys_mem_access_prot_allowed(), which checks whether the mapping is possible, without any conflicts and returns success or failure based on that. phys_mem_access_prot() by itself does not allow failure case. This ability to return error is needed for PAT where we may have aliasing conflicts. x86 setup __HAVE_PHYS_MEM_ACCESS_PROT and move x86 specific code out of /dev/mem into arch specific area. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r--include/asm-x86/pgtable.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index f1d9f4a03f6f..1902f0aed6c1 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -289,6 +289,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
289 289
290#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) 290#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
291 291
292#ifndef __ASSEMBLY__
293#define __HAVE_PHYS_MEM_ACCESS_PROT
294struct file;
295pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
296 unsigned long size, pgprot_t vma_prot);
297int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
298 unsigned long size, pgprot_t *vma_prot);
299#endif
300
292#ifdef CONFIG_PARAVIRT 301#ifdef CONFIG_PARAVIRT
293#include <asm/paravirt.h> 302#include <asm/paravirt.h>
294#else /* !CONFIG_PARAVIRT */ 303#else /* !CONFIG_PARAVIRT */