Changeset 8f00329 in mainline for genarch/src/mm/page_ht.c
- Timestamp:
- 2006-02-09T21:59:31Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a3eeceb6
- Parents:
- bfb87df
- File:
-
- 1 edited
-
genarch/src/mm/page_ht.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/page_ht.c
rbfb87df r8f00329 48 48 49 49 static void ht_mapping_insert(as_t *as, __address page, __address frame, int flags); 50 static void ht_mapping_remove(as_t *as, __address page); 50 51 static pte_t *ht_mapping_find(as_t *as, __address page); 51 52 … … 71 72 page_mapping_operations_t ht_mapping_operations = { 72 73 .mapping_insert = ht_mapping_insert, 74 .mapping_remove = ht_mapping_remove, 73 75 .mapping_find = ht_mapping_find 74 76 }; … … 163 165 { 164 166 pte_t *t; 165 ipl_t ipl;166 167 __native key[2] = { (__address) as, page }; 167 168 168 ipl = interrupts_disable();169 169 spinlock_lock(&page_ht_lock); 170 170 … … 177 177 178 178 spinlock_unlock(&page_ht_lock); 179 interrupts_restore(ipl); 180 } 179 } 180 181 /** Remove mapping of page from page hash table. 182 * 183 * Remove any mapping of 'page' within address space 'as'. 184 * TLB shootdown should follow in order to make effects of 185 * this call visible. 186 * 187 * The address space must be locked and interrupts must be disabled. 188 * 189 * @param as Address space to wich page belongs. 190 * @param page Virtual address of the page to be demapped. 191 */ 192 void ht_mapping_remove(as_t *as, __address page) 193 { 194 __native key[2] = { (__address) as, page }; 195 196 spinlock_lock(&page_ht_lock); 197 198 /* 199 * Note that removed PTE's will be freed 200 * by remove_callback(). 201 */ 202 hash_table_remove(&page_ht, key, 2); 203 204 spinlock_unlock(&page_ht_lock); 205 } 206 181 207 182 208 /** Find mapping for virtual page in page hash table.
Note:
See TracChangeset
for help on using the changeset viewer.
