summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/vm/vm_map.c21
-rw-r--r--sys/vm/vm_map.h9
2 files changed, 30 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index fd69c4e..d253b94f 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -4257,6 +4257,27 @@ vm_map_lookup_done(vm_map_t map, vm_map_entry_t entry)
vm_map_unlock_read(map);
}
+vm_offset_t
+vm_map_max_KBI(const struct vm_map *map)
+{
+
+ return (map->max_offset);
+}
+
+vm_offset_t
+vm_map_min_KBI(const struct vm_map *map)
+{
+
+ return (map->min_offset);
+}
+
+pmap_t
+vm_map_pmap_KBI(vm_map_t map)
+{
+
+ return (map->pmap);
+}
+
#include "opt_ddb.h"
#ifdef DDB
#include <sys/kernel.h>
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index fc0c0c7..7643afc 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -205,6 +205,11 @@ struct vm_map {
#define MAP_BUSY_WAKEUP 0x02
#ifdef _KERNEL
+#ifdef KLD_MODULE
+#define vm_map_max(map) vm_map_max_KBI((map))
+#define vm_map_min(map) vm_map_min_KBI((map))
+#define vm_map_pmap(map) vm_map_pmap_KBI((map))
+#else
static __inline vm_offset_t
vm_map_max(const struct vm_map *map)
{
@@ -228,6 +233,7 @@ vm_map_modflags(vm_map_t map, vm_flags_t set, vm_flags_t clear)
{
map->flags = (map->flags | set) & ~clear;
}
+#endif /* KLD_MODULE */
#endif /* _KERNEL */
/*
@@ -288,6 +294,9 @@ void vm_map_wakeup(vm_map_t map);
void vm_map_busy(vm_map_t map);
void vm_map_unbusy(vm_map_t map);
void vm_map_wait_busy(vm_map_t map);
+vm_offset_t vm_map_max_KBI(const struct vm_map *map);
+vm_offset_t vm_map_min_KBI(const struct vm_map *map);
+pmap_t vm_map_pmap_KBI(vm_map_t map);
#define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE)
#define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE)
OpenPOWER on IntegriCloud