Changeset a35b458 in mainline for kernel/genarch/src/mm/page_ht.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/page_ht.c
r3061bc1 ra35b458 135 135 { 136 136 assert(item); 137 137 138 138 pte_t *pte = hash_table_get_inst(item, pte_t, link); 139 139 slab_free(pte_cache, pte); … … 162 162 163 163 irq_spinlock_lock(&page_ht_lock, true); 164 164 165 165 if (!hash_table_find(&page_ht, key)) { 166 166 pte_t *pte = slab_alloc(pte_cache, FRAME_LOWMEM | FRAME_ATOMIC); 167 167 assert(pte != NULL); 168 168 169 169 pte->g = (flags & PAGE_GLOBAL) != 0; 170 170 pte->x = (flags & PAGE_EXEC) != 0; … … 175 175 pte->a = false; 176 176 pte->d = false; 177 177 178 178 pte->as = as; 179 179 pte->page = ALIGN_DOWN(page, PAGE_SIZE); … … 185 185 */ 186 186 write_barrier(); 187 187 188 188 hash_table_insert(&page_ht, &pte->link); 189 189 } … … 210 210 211 211 assert(page_table_locked(as)); 212 212 213 213 irq_spinlock_lock(&page_ht_lock, true); 214 214 … … 235 235 if (cur) 236 236 return hash_table_get_inst(cur, pte_t, link); 237 237 238 238 return NULL; 239 239 } … … 257 257 258 258 irq_spinlock_unlock(&page_ht_lock, true); 259 259 260 260 return t != NULL; 261 261 } … … 275 275 if (!t) 276 276 panic("Updating non-existent PTE"); 277 277 278 278 assert(pte->as == t->as); 279 279 assert(pte->page == t->page);
Note:
See TracChangeset
for help on using the changeset viewer.