Rev 2087 | Rev 2094 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2087 | Rev 2089 | ||
|---|---|---|---|
| Line 72... | Line 72... | ||
| 72 | #include <arch.h> |
72 | #include <arch.h> |
| 73 | #include <errno.h> |
73 | #include <errno.h> |
| 74 | #include <config.h> |
74 | #include <config.h> |
| 75 | #include <align.h> |
75 | #include <align.h> |
| 76 | #include <arch/types.h> |
76 | #include <arch/types.h> |
| 77 | #include <typedefs.h> |
- | |
| 78 | #include <syscall/copy.h> |
77 | #include <syscall/copy.h> |
| 79 | #include <arch/interrupt.h> |
78 | #include <arch/interrupt.h> |
| 80 | 79 | ||
| 81 | #ifdef CONFIG_VIRT_IDX_DCACHE |
80 | #ifdef CONFIG_VIRT_IDX_DCACHE |
| 82 | #include <arch/mm/cache.h> |
81 | #include <arch/mm/cache.h> |
| Line 166... | Line 165... | ||
| 166 | else |
165 | else |
| 167 | as->asid = ASID_INVALID; |
166 | as->asid = ASID_INVALID; |
| 168 | 167 | ||
| 169 | as->refcount = 0; |
168 | as->refcount = 0; |
| 170 | as->cpu_refcount = 0; |
169 | as->cpu_refcount = 0; |
| - | 170 | #ifdef AS_PAGE_TABLE |
|
| 171 | as->page_table = page_table_create(flags); |
171 | as->page_table = page_table_create(flags); |
| - | 172 | #else |
|
| - | 173 | page_table_create(flags); |
|
| - | 174 | #endif |
|
| 172 | 175 | ||
| 173 | return as; |
176 | return as; |
| 174 | } |
177 | } |
| 175 | 178 | ||
| 176 | /** Destroy adress space. |
179 | /** Destroy adress space. |
| Line 214... | Line 217... | ||
| 214 | as_area_destroy(as, node->key[0]); |
217 | as_area_destroy(as, node->key[0]); |
| 215 | } |
218 | } |
| 216 | } |
219 | } |
| 217 | 220 | ||
| 218 | btree_destroy(&as->as_area_btree); |
221 | btree_destroy(&as->as_area_btree); |
| - | 222 | #ifdef AS_PAGE_TABLE |
|
| 219 | page_table_destroy(as->page_table); |
223 | page_table_destroy(as->page_table); |
| - | 224 | #else |
|
| - | 225 | page_table_destroy(NULL); |
|
| - | 226 | #endif |
|
| 220 | 227 | ||
| 221 | interrupts_restore(ipl); |
228 | interrupts_restore(ipl); |
| 222 | 229 | ||
| 223 | slab_free(as_slab, as); |
230 | slab_free(as_slab, as); |
| 224 | } |
231 | } |