Changeset c9f0975 in mainline for kernel/generic/src/mm/page.c
- Timestamp:
- 2011-06-01T10:04:32Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 65c3794
- Parents:
- 049a16f (diff), df29f24 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/page.c
r049a16f rc9f0975 112 112 * using flags. Allocate and setup any missing page tables. 113 113 * 114 * @param as Address space to w ich page belongs.114 * @param as Address space to which page belongs. 115 115 * @param page Virtual address of the page to be mapped. 116 116 * @param frame Physical address of memory frame to which the mapping is … … 139 139 * this call visible. 140 140 * 141 * @param as Address space to w ich page belongs.141 * @param as Address space to which page belongs. 142 142 * @param page Virtual address of the page to be demapped. 143 143 * … … 156 156 } 157 157 158 /** Find mapping for virtual page 159 * 160 * Find mapping for virtual page. 161 * 162 * @param as Address space to wich page belongs. 163 * @param page Virtual page. 158 /** Find mapping for virtual page. 159 * 160 * @param as Address space to which page belongs. 161 * @param page Virtual page. 162 * @param nolock True if the page tables need not be locked. 164 163 * 165 164 * @return NULL if there is no such mapping; requested mapping … … 167 166 * 168 167 */ 169 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page )170 { 171 ASSERT( page_table_locked(as));168 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page, bool nolock) 169 { 170 ASSERT(nolock || page_table_locked(as)); 172 171 173 172 ASSERT(page_mapping_operations); 174 173 ASSERT(page_mapping_operations->mapping_find); 175 174 176 return page_mapping_operations->mapping_find(as, page );175 return page_mapping_operations->mapping_find(as, page, nolock); 177 176 } 178 177 … … 188 187 mutex_lock(&AS->lock); 189 188 190 pte_t *pte = page_mapping_find(AS, virt_address );189 pte_t *pte = page_mapping_find(AS, virt_address, true); 191 190 if (!PTE_VALID(pte) || !PTE_PRESENT(pte)) { 192 191 mutex_unlock(&AS->lock);
Note:
See TracChangeset
for help on using the changeset viewer.