diff options
author | Richard Braun <rbraun@sceen.net> | 2013-06-13 10:23:07 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-07-06 19:02:10 +0200 |
commit | 738d08d5e306e67ba443763fd648a393a48c55d4 (patch) | |
tree | a5e1b6acd666d3ea0bb2ff5bc0725e50f69076f0 | |
parent | 48374912a30ae97b725ec99499b8f3ca683b6f8a (diff) |
vm/vm_map: fix map entry merging
-rw-r--r-- | Makefrag.am | 2 | ||||
-rw-r--r-- | vm/vm_map.c | 3 | ||||
-rw-r--r-- | vm/vm_map.h | 1 | ||||
-rw-r--r-- | vm/vm_page.h | 14 | ||||
-rw-r--r-- | vm/vm_phys.c | 3 | ||||
-rw-r--r-- | vm/vm_setup.c | 4 |
6 files changed, 22 insertions, 5 deletions
diff --git a/Makefrag.am b/Makefrag.am index 3dcb507f..8740ac6e 100644 --- a/Makefrag.am +++ b/Makefrag.am @@ -55,6 +55,8 @@ x15_SOURCES += \ x15_SOURCES += \ vm/vm_adv.h \ + vm/vm_anon.c \ + vm/vm_anon.h \ vm/vm_inherit.h \ vm/vm_kmem.c \ vm/vm_kmem.h \ diff --git a/vm/vm_map.c b/vm/vm_map.c index d6000e19..4ff86904 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -46,8 +46,9 @@ #include <machine/pmap.h> #include <vm/vm_adv.h> #include <vm/vm_inherit.h> -#include <vm/vm_map.h> #include <vm/vm_kmem.h> +#include <vm/vm_map.h> +#include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_phys.h> #include <vm/vm_prot.h> diff --git a/vm/vm_map.h b/vm/vm_map.h index c68072d7..7a2bc44c 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -28,6 +28,7 @@ #include <machine/pmap.h> #include <vm/vm_adv.h> #include <vm/vm_inherit.h> +#include <vm/vm_object.h> #include <vm/vm_prot.h> /* diff --git a/vm/vm_page.h b/vm/vm_page.h index 205f3d2f..9a59df0a 100644 --- a/vm/vm_page.h +++ b/vm/vm_page.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011 Richard Braun. + * Copyright (c) 2010, 2011, 2013 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include <kern/macros.h> #include <kern/param.h> #include <kern/types.h> +#include <vm/vm_object.h> /* * Address/page conversion and rounding macros (not inline functions to @@ -41,8 +42,17 @@ struct vm_page { struct list node; unsigned short seg_index; unsigned short order; + + union { + struct { + struct vm_object *object; + uint64_t offset; + }; + + void *slab_priv; + }; + phys_addr_t phys_addr; - void *slab_priv; }; static inline phys_addr_t diff --git a/vm/vm_phys.c b/vm/vm_phys.c index 1cfc2290..3f8f8d41 100644 --- a/vm/vm_phys.c +++ b/vm/vm_phys.c @@ -154,8 +154,9 @@ vm_phys_init_page(struct vm_page *page, unsigned short seg_index, { page->seg_index = seg_index; page->order = order; + page->object = NULL; + page->offset = 0; page->phys_addr = pa; - page->slab_priv = NULL; } static void __init diff --git a/vm/vm_setup.c b/vm/vm_setup.c index 6d21597c..aef9e800 100644 --- a/vm/vm_setup.c +++ b/vm/vm_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012 Richard Braun. + * Copyright (c) 2011, 2012, 2013 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ #include <kern/init.h> #include <kern/kmem.h> #include <machine/pmap.h> +#include <vm/vm_anon.h> #include <vm/vm_map.h> #include <vm/vm_kmem.h> #include <vm/vm_phys.h> @@ -31,4 +32,5 @@ vm_setup(void) kmem_setup(); vm_map_setup(); pmap_setup(); + vm_anon_setup(); } |