pmap: T229 rename struct pmap_mapping_info fields to not start with 'ret' release2016-11-09
authorMoritz Hoffmann <moritz.hoffmann@inf.ethz.ch>
Wed, 9 Nov 2016 07:54:08 +0000 (08:54 +0100)
committerMoritz Hoffmann <moritz.hoffmann@inf.ethz.ch>
Wed, 9 Nov 2016 07:54:21 +0000 (08:54 +0100)
Also store the mapping cap in the result.

Signed-off-by: Moritz Hoffmann <moritz.hoffmann@inf.ethz.ch>

include/barrelfish/pmap.h
lib/barrelfish/target/x86_64/pmap_target.c

index 883a055..817c9ca 100644 (file)
@@ -45,11 +45,12 @@ struct pmap {
 };
 
 struct pmap_mapping_info {
-    genvaddr_t retvaddr;        ///< The page-aligned virtual address
-    size_t retsize;             ///< Size of the backing page
-    struct capref retcap;       ///< Capability to the frame mapped here
-    genvaddr_t retoffset;       ///< Offset into the frame
-    vregion_flags_t retflags;   ///< Mapping flags
+    genvaddr_t vaddr;        ///< The page-aligned virtual address
+    size_t size;             ///< Size of the backing page
+    struct capref cap;       ///< Capability to the frame mapped here
+    genvaddr_t offset;       ///< Offset into the frame
+    vregion_flags_t flags;   ///< Mapping flags
+    struct capref mapping;   ///< Mapping cap
 };
 
 #endif // LIBBARRELFISH_PMAP_H
index 196bb6d..a809dd1 100644 (file)
@@ -962,11 +962,12 @@ static errval_t lookup(struct pmap *pmap, genvaddr_t vaddr,
     }
 
     if (info) {
-        info->retvaddr = vaddr & ~(genvaddr_t)(find_info.page_size - 1);
-        info->retsize = find_info.page_size;
-        info->retcap = find_info.page->u.frame.cap;
-        info->retoffset = find_info.page->u.frame.offset;
-        info->retflags = find_info.page->u.frame.flags;
+        info->vaddr = vaddr & ~(genvaddr_t)(find_info.page_size - 1);
+        info->size = find_info.page_size;
+        info->cap = find_info.page->u.frame.cap;
+        info->offset = find_info.page->u.frame.offset;
+        info->flags = find_info.page->u.frame.flags;
+        info->mapping = find_info.page->mapping;
     }
     return SYS_ERR_OK;
 }