summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-06-28 20:44:33 +0200
committerRichard Braun <rbraun@sceen.net>2013-06-28 20:44:33 +0200
commit0239be76d4601a2a1bf448965e0ffc7c17735613 (patch)
tree1494a4c85543b6b921a91b9e51b45e64e7b687e9 /arch/x86/machine/pmap.h
parent4df29fcd578766758d516cb207a8a484aaf7e4b3 (diff)
x86/pmap: replace pmap_kextract with pmap_extract
As it was done for pmap_protect, replace a kernel-specific call with one that can handle both the kernel and regular pmaps. The new function isn't complete yet and cannot handle physical maps that aren't the kernel pmap or the currently loaded pmap.
Diffstat (limited to 'arch/x86/machine/pmap.h')
-rw-r--r--arch/x86/machine/pmap.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/machine/pmap.h b/arch/x86/machine/pmap.h
index e9a7d38..fc6a932 100644
--- a/arch/x86/machine/pmap.h
+++ b/arch/x86/machine/pmap.h
@@ -179,7 +179,6 @@ void pmap_kgrow(unsigned long end);
*/
void pmap_kenter(unsigned long va, phys_addr_t pa);
void pmap_kremove(unsigned long start, unsigned long end);
-phys_addr_t pmap_kextract(unsigned long va);
/*
* Set the protection of mappings in a physical map.
@@ -188,6 +187,15 @@ void pmap_protect(struct pmap *pmap, unsigned long start, unsigned long end,
int prot);
/*
+ * Extract a mapping from a physical map.
+ *
+ * This function walks the page tables to retreive the physical address
+ * mapped at the given virtual address. If there is no mapping for the
+ * virtual address, 0 is returned (implying that page 0 is always reserved).
+ */
+phys_addr_t pmap_extract(struct pmap *pmap, unsigned long va);
+
+/*
* Flush the TLB for the given range of kernel addresses.
*/
void pmap_kupdate(unsigned long start, unsigned long end);