Changeset 01029fc in mainline
- Timestamp:
- 2012-11-07T21:30:44Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b8a990
- Parents:
- c387838
- Location:
- kernel/generic
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
rc387838 r01029fc 224 224 void (* destroy)(as_area_t *); 225 225 226 bool (* is_resizable)(as_area_t *); 227 bool (* is_shareable)(as_area_t *); 228 226 229 int (* page_fault)(as_area_t *, uintptr_t, pf_access_t); 227 230 void (* frame_free)(as_area_t *, uintptr_t, uintptr_t); -
kernel/generic/src/mm/as.c
rc387838 r01029fc 696 696 return ENOENT; 697 697 } 698 699 if (area->backend == &phys_backend) { 700 /* 701 * Remapping of address space areas associated 702 * with memory mapped devices is not supported. 698 699 if (!area->backend->is_resizable(area)) { 700 /* 701 * The backend does not support resizing for this area. 703 702 */ 704 703 mutex_unlock(&area->lock); … … 1057 1056 } 1058 1057 1059 if ((!src_area->backend) || (!src_area->backend->share)) { 1060 /* 1061 * There is no backend or the backend does not 1062 * know how to share the area. 1058 if (!src_area->backend->is_shareable(src_area)) { 1059 /* 1060 * The backend does not permit sharing of this area. 1063 1061 */ 1064 1062 mutex_unlock(&src_area->lock); -
kernel/generic/src/mm/backend_anon.c
rc387838 r01029fc 59 59 static void anon_destroy(as_area_t *); 60 60 61 static bool anon_is_resizable(as_area_t *); 62 static bool anon_is_shareable(as_area_t *); 63 61 64 static int anon_page_fault(as_area_t *, uintptr_t, pf_access_t); 62 65 static void anon_frame_free(as_area_t *, uintptr_t, uintptr_t); … … 67 70 .share = anon_share, 68 71 .destroy = anon_destroy, 72 73 .is_resizable = anon_is_resizable, 74 .is_shareable = anon_is_shareable, 69 75 70 76 .page_fault = anon_page_fault, … … 152 158 } 153 159 160 bool anon_is_resizable(as_area_t *area) 161 { 162 return true; 163 } 164 165 bool anon_is_shareable(as_area_t *area) 166 { 167 return !(area->flags & AS_AREA_LATE_RESERVE); 168 } 154 169 155 170 /** Service a page fault in the anonymous memory address space area. -
kernel/generic/src/mm/backend_elf.c
rc387838 r01029fc 58 58 static void elf_destroy(as_area_t *); 59 59 60 static bool elf_is_resizable(as_area_t *); 61 static bool elf_is_shareable(as_area_t *); 62 60 63 static int elf_page_fault(as_area_t *, uintptr_t, pf_access_t); 61 64 static void elf_frame_free(as_area_t *, uintptr_t, uintptr_t); … … 66 69 .share = elf_share, 67 70 .destroy = elf_destroy, 71 72 .is_resizable = elf_is_resizable, 73 .is_shareable = elf_is_shareable, 68 74 69 75 .page_fault = elf_page_fault, … … 213 219 } 214 220 221 bool elf_is_resizable(as_area_t *area) 222 { 223 return true; 224 } 225 226 bool elf_is_shareable(as_area_t *area) 227 { 228 return true; 229 } 230 231 215 232 /** Service a page fault in the ELF backend address space area. 216 233 * -
kernel/generic/src/mm/backend_phys.c
rc387838 r01029fc 52 52 static void phys_destroy(as_area_t *); 53 53 54 static bool phys_is_resizable(as_area_t *); 55 static bool phys_is_shareable(as_area_t *); 56 57 54 58 static int phys_page_fault(as_area_t *, uintptr_t, pf_access_t); 55 59 … … 59 63 .share = phys_share, 60 64 .destroy = phys_destroy, 65 66 .is_resizable = phys_is_resizable, 67 .is_shareable = phys_is_shareable, 61 68 62 69 .page_fault = phys_page_fault, … … 87 94 /* Nothing to do. */ 88 95 } 96 97 bool phys_is_resizable(as_area_t *area) 98 { 99 return false; 100 } 101 102 bool phys_is_shareable(as_area_t *area) 103 { 104 return true; 105 } 106 89 107 90 108 /** Service a page fault in the address space area backed by physical memory.
Note:
See TracChangeset
for help on using the changeset viewer.