Changeset 235e6c7 in mainline
- Timestamp:
- 2011-05-21T16:47:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c99693a
- Parents:
- 0ff03f3
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/mm/page_pt.h
r0ff03f3 r235e6c7 129 129 130 130 extern void page_mapping_insert_pt(as_t *, uintptr_t, uintptr_t, unsigned int); 131 extern pte_t *page_mapping_find_pt(as_t *, uintptr_t );131 extern pte_t *page_mapping_find_pt(as_t *, uintptr_t, bool); 132 132 133 133 #endif -
kernel/genarch/src/mm/page_ht.c
r0ff03f3 r235e6c7 58 58 static void ht_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int); 59 59 static void ht_mapping_remove(as_t *, uintptr_t); 60 static pte_t *ht_mapping_find(as_t *, uintptr_t );60 static pte_t *ht_mapping_find(as_t *, uintptr_t, bool); 61 61 62 62 /** … … 214 214 * this call visible. 215 215 * 216 * @param as Address space to w ich page belongs.216 * @param as Address space to which page belongs. 217 217 * @param page Virtual address of the page to be demapped. 218 218 * … … 237 237 /** Find mapping for virtual page in page hash table. 238 238 * 239 * Find mapping for virtual page. 240 * 241 * @param as Address space to wich page belongs. 242 * @param page Virtual page. 239 * @param as Address space to which page belongs. 240 * @param page Virtual page. 241 * @param nolock True if the page tables need not be locked. 243 242 * 244 243 * @return NULL if there is no such mapping; requested mapping otherwise. 245 244 * 246 245 */ 247 pte_t *ht_mapping_find(as_t *as, uintptr_t page )246 pte_t *ht_mapping_find(as_t *as, uintptr_t page, bool nolock) 248 247 { 249 248 sysarg_t key[2] = { … … 252 251 }; 253 252 254 ASSERT( page_table_locked(as));253 ASSERT(nolock || page_table_locked(as)); 255 254 256 255 link_t *cur = hash_table_find(&page_ht, key); -
kernel/genarch/src/mm/page_pt.c
r0ff03f3 r235e6c7 48 48 static void pt_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int); 49 49 static void pt_mapping_remove(as_t *, uintptr_t); 50 static pte_t *pt_mapping_find(as_t *, uintptr_t );50 static pte_t *pt_mapping_find(as_t *, uintptr_t, bool); 51 51 52 52 page_mapping_operations_t pt_mapping_operations = { … … 238 238 /** Find mapping for virtual page in hierarchical page tables. 239 239 * 240 * Find mapping for virtual page. 241 * 242 * @param as Address space to which page belongs. 243 * @param page Virtual page. 240 * @param as Address space to which page belongs. 241 * @param page Virtual page. 242 * @param nolock True if the page tables need not be locked. 244 243 * 245 244 * @return NULL if there is no such mapping; entry from PTL3 describing … … 247 246 * 248 247 */ 249 pte_t *pt_mapping_find(as_t *as, uintptr_t page )248 pte_t *pt_mapping_find(as_t *as, uintptr_t page, bool nolock) 250 249 { 251 ASSERT( page_table_locked(as));250 ASSERT(nolock || page_table_locked(as)); 252 251 253 252 pte_t *ptl0 = (pte_t *) PA2KA((uintptr_t) as->genarch.page_table); -
kernel/generic/include/mm/page.h
r0ff03f3 r235e6c7 47 47 void (* mapping_insert)(as_t *, uintptr_t, uintptr_t, unsigned int); 48 48 void (* mapping_remove)(as_t *, uintptr_t); 49 pte_t *(* mapping_find)(as_t *, uintptr_t );49 pte_t *(* mapping_find)(as_t *, uintptr_t, bool); 50 50 } page_mapping_operations_t; 51 51 -
kernel/generic/src/mm/page.c
r0ff03f3 r235e6c7 169 169 ASSERT(page_mapping_operations->mapping_find); 170 170 171 return page_mapping_operations->mapping_find(as, page );171 return page_mapping_operations->mapping_find(as, page, nolock); 172 172 } 173 173
Note:
See TracChangeset
for help on using the changeset viewer.