Rev 1468 | Rev 1495 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1468 | Rev 1483 | ||
---|---|---|---|
Line 159... | Line 159... | ||
159 | for (cond = true; cond; ) { |
159 | for (cond = true; cond; ) { |
160 | btree_node_t *node; |
160 | btree_node_t *node; |
161 | 161 | ||
162 | ASSERT(!list_empty(&as->as_area_btree.leaf_head)); |
162 | ASSERT(!list_empty(&as->as_area_btree.leaf_head)); |
163 | node = list_get_instance(&as->as_area_btree.leaf_head.next, btree_node_t, leaf_link); |
163 | node = list_get_instance(&as->as_area_btree.leaf_head.next, btree_node_t, leaf_link); |
164 | if ((cond = node->keys)) { |
164 | if ((cond = node->keys)) |
165 | as_area_destroy(as, node->key[0]); |
165 | as_area_destroy(as, node->key[0]); |
166 | btree_remove(&as->as_area_btree, node->key[0], node); |
- | |
167 | } |
- | |
168 | } |
166 | } |
169 | 167 | ||
- | 168 | btree_destroy(&as->as_area_btree); |
|
170 | page_table_destroy(as->page_table); |
169 | page_table_destroy(as->page_table); |
171 | 170 | ||
172 | interrupts_restore(ipl); |
171 | interrupts_restore(ipl); |
173 | 172 | ||
174 | free(as); |
173 | free(as); |
Line 458... | Line 457... | ||
458 | b + i*PAGE_SIZE, PTE_GET_FRAME(pte)); |
457 | b + i*PAGE_SIZE, PTE_GET_FRAME(pte)); |
459 | } |
458 | } |
460 | page_mapping_remove(as, b + i*PAGE_SIZE); |
459 | page_mapping_remove(as, b + i*PAGE_SIZE); |
461 | page_table_unlock(as, false); |
460 | page_table_unlock(as, false); |
462 | } |
461 | } |
463 | if (!used_space_remove(area, b, i)) |
- | |
464 | panic("Could not remove used space.\n"); |
- | |
465 | } |
462 | } |
466 | } |
463 | } |
467 | 464 | ||
468 | /* |
465 | /* |
469 | * Finish TLB shootdown sequence. |
466 | * Finish TLB shootdown sequence. |
Line 1487... | Line 1484... | ||
1487 | 1484 | ||
1488 | ASSERT(!list_empty(&sh_info->pagemap.leaf_head)); |
1485 | ASSERT(!list_empty(&sh_info->pagemap.leaf_head)); |
1489 | node = list_get_instance(sh_info->pagemap.leaf_head.next, btree_node_t, leaf_link); |
1486 | node = list_get_instance(sh_info->pagemap.leaf_head.next, btree_node_t, leaf_link); |
1490 | if ((cond = node->keys)) { |
1487 | if ((cond = node->keys)) { |
1491 | frame_free(ADDR2PFN((__address) node->value[0])); |
1488 | frame_free(ADDR2PFN((__address) node->value[0])); |
1492 | btree_remove(&sh_info->pagemap, node->key[0], node); |
- | |
1493 | } |
1489 | } |
1494 | } |
1490 | } |
1495 | 1491 | ||
1496 | } |
1492 | } |
1497 | mutex_unlock(&sh_info->lock); |
1493 | mutex_unlock(&sh_info->lock); |