From 0239be76d4601a2a1bf448965e0ffc7c17735613 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 28 Jun 2013 20:44:33 +0200 Subject: 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. --- arch/x86/machine/pmap.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'arch/x86/machine/pmap.h') 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. @@ -187,6 +186,15 @@ phys_addr_t pmap_kextract(unsigned long va); 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. */ -- cgit v1.2.3