Changeset 0ff03f3 in mainline
- Timestamp:
- 2011-05-21T16:23:43Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 235e6c7
- Parents:
- 9d47440
- Location:
- kernel
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/tlb.c
r9d47440 r0ff03f3 481 481 482 482 page_table_lock(AS, true); 483 t = page_mapping_find(AS, va );483 t = page_mapping_find(AS, va, true); 484 484 if (t) { 485 485 /* … … 599 599 600 600 page_table_lock(AS, true); 601 pte_t *entry = page_mapping_find(AS, va );601 pte_t *entry = page_mapping_find(AS, va, true); 602 602 if (entry) { 603 603 /* … … 651 651 652 652 page_table_lock(AS, true); 653 t = page_mapping_find(AS, va );653 t = page_mapping_find(AS, va, true); 654 654 ASSERT((t) && (t->p)); 655 655 if ((t) && (t->p) && (t->w)) { … … 684 684 685 685 page_table_lock(AS, true); 686 t = page_mapping_find(AS, va );686 t = page_mapping_find(AS, va, true); 687 687 ASSERT((t) && (t->p)); 688 688 if ((t) && (t->p) && (t->x)) { … … 717 717 718 718 page_table_lock(AS, true); 719 t = page_mapping_find(AS, va );719 t = page_mapping_find(AS, va, true); 720 720 ASSERT((t) && (t->p)); 721 721 if ((t) && (t->p)) { … … 753 753 */ 754 754 page_table_lock(AS, true); 755 t = page_mapping_find(AS, va );755 t = page_mapping_find(AS, va, true); 756 756 ASSERT((t) && (t->p)); 757 757 ASSERT(!t->w); … … 778 778 779 779 page_table_lock(AS, true); 780 t = page_mapping_find(AS, va );780 t = page_mapping_find(AS, va, true); 781 781 ASSERT(t); 782 782 -
kernel/arch/mips32/src/mm/tlb.c
r9d47440 r0ff03f3 379 379 * Check if the mapping exists in page tables. 380 380 */ 381 pte = page_mapping_find(AS, badvaddr );381 pte = page_mapping_find(AS, badvaddr, true); 382 382 if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) { 383 383 /* … … 401 401 */ 402 402 page_table_lock(AS, true); 403 pte = page_mapping_find(AS, badvaddr );403 pte = page_mapping_find(AS, badvaddr, true); 404 404 ASSERT(pte && pte->p); 405 405 ASSERT(pte->w || access != PF_ACCESS_WRITE); -
kernel/arch/ppc32/src/mm/tlb.c
r9d47440 r0ff03f3 67 67 * Check if the mapping exists in page tables. 68 68 */ 69 pte_t *pte = page_mapping_find(as, badvaddr );69 pte_t *pte = page_mapping_find(as, badvaddr, true); 70 70 if ((pte) && (pte->present)) { 71 71 /* … … 89 89 */ 90 90 page_table_lock(as, true); 91 pte = page_mapping_find(as, badvaddr );91 pte = page_mapping_find(as, badvaddr, true); 92 92 ASSERT((pte) && (pte->present)); 93 93 *pfrc = 0; -
kernel/arch/sparc64/src/mm/sun4u/tlb.c
r9d47440 r0ff03f3 207 207 208 208 page_table_lock(AS, true); 209 t = page_mapping_find(AS, page_16k );209 t = page_mapping_find(AS, page_16k, true); 210 210 if (t && PTE_EXECUTABLE(t)) { 211 211 /* … … 275 275 276 276 page_table_lock(AS, true); 277 t = page_mapping_find(AS, page_16k );277 t = page_mapping_find(AS, page_16k, true); 278 278 if (t) { 279 279 /* … … 319 319 320 320 page_table_lock(AS, true); 321 t = page_mapping_find(AS, page_16k );321 t = page_mapping_find(AS, page_16k, true); 322 322 if (t && PTE_WRITABLE(t)) { 323 323 /* -
kernel/arch/sparc64/src/mm/sun4v/tlb.c
r9d47440 r0ff03f3 219 219 220 220 page_table_lock(AS, true); 221 t = page_mapping_find(AS, va );221 t = page_mapping_find(AS, va, true); 222 222 223 223 if (t && PTE_EXECUTABLE(t)) { … … 275 275 276 276 page_table_lock(AS, true); 277 t = page_mapping_find(AS, va );277 t = page_mapping_find(AS, va, true); 278 278 if (t) { 279 279 /* … … 317 317 318 318 page_table_lock(AS, true); 319 t = page_mapping_find(AS, va );319 t = page_mapping_find(AS, va, true); 320 320 if (t && PTE_WRITABLE(t)) { 321 321 /* -
kernel/generic/include/mm/page.h
r9d47440 r0ff03f3 58 58 extern void page_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int); 59 59 extern void page_mapping_remove(as_t *, uintptr_t); 60 extern pte_t *page_mapping_find(as_t *, uintptr_t );60 extern pte_t *page_mapping_find(as_t *, uintptr_t, bool); 61 61 extern pte_t *page_table_create(unsigned int); 62 62 extern void page_table_destroy(pte_t *); -
kernel/generic/src/mm/as.c
r9d47440 r0ff03f3 649 649 for (; i < size; i++) { 650 650 pte_t *pte = page_mapping_find(as, 651 ptr + P2SZ(i) );651 ptr + P2SZ(i), false); 652 652 653 653 ASSERT(pte); … … 798 798 for (size = 0; size < (size_t) node->value[i]; size++) { 799 799 pte_t *pte = page_mapping_find(as, 800 ptr + P2SZ(size) );800 ptr + P2SZ(size), false); 801 801 802 802 ASSERT(pte); … … 1105 1105 for (size = 0; size < (size_t) node->value[i]; size++) { 1106 1106 pte_t *pte = page_mapping_find(as, 1107 ptr + P2SZ(size) );1107 ptr + P2SZ(size), false); 1108 1108 1109 1109 ASSERT(pte); … … 1241 1241 */ 1242 1242 pte_t *pte; 1243 if ((pte = page_mapping_find(AS, page ))) {1243 if ((pte = page_mapping_find(AS, page, false))) { 1244 1244 if (PTE_PRESENT(pte)) { 1245 1245 if (((access == PF_ACCESS_READ) && PTE_READABLE(pte)) || -
kernel/generic/src/mm/backend_anon.c
r9d47440 r0ff03f3 122 122 page_table_lock(area->as, false); 123 123 pte = page_mapping_find(area->as, 124 base + j * PAGE_SIZE );124 base + j * PAGE_SIZE, false); 125 125 ASSERT(pte && PTE_VALID(pte) && 126 126 PTE_PRESENT(pte)); -
kernel/generic/src/mm/backend_elf.c
r9d47440 r0ff03f3 188 188 page_table_lock(area->as, false); 189 189 pte = page_mapping_find(area->as, 190 base + j * PAGE_SIZE );190 base + j * PAGE_SIZE, false); 191 191 ASSERT(pte && PTE_VALID(pte) && 192 192 PTE_PRESENT(pte)); -
kernel/generic/src/mm/page.c
r9d47440 r0ff03f3 108 108 * using flags. Allocate and setup any missing page tables. 109 109 * 110 * @param as Address space to w ich page belongs.110 * @param as Address space to which page belongs. 111 111 * @param page Virtual address of the page to be mapped. 112 112 * @param frame Physical address of memory frame to which the mapping is … … 135 135 * this call visible. 136 136 * 137 * @param as Address space to w ich page belongs.137 * @param as Address space to which page belongs. 138 138 * @param page Virtual address of the page to be demapped. 139 139 * … … 152 152 } 153 153 154 /** Find mapping for virtual page 154 /** Find mapping for virtual page. 155 155 * 156 * Find mapping for virtual page. 157 * 158 * @param as Address space to wich page belongs. 159 * @param page Virtual page. 156 * @param as Address space to which page belongs. 157 * @param page Virtual page. 158 * @param nolock True if the page tables need not be locked. 160 159 * 161 160 * @return NULL if there is no such mapping; requested mapping … … 163 162 * 164 163 */ 165 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page )164 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page, bool nolock) 166 165 { 167 ASSERT( page_table_locked(as));166 ASSERT(nolock || page_table_locked(as)); 168 167 169 168 ASSERT(page_mapping_operations); -
kernel/generic/src/synch/futex.c
r9d47440 r0ff03f3 119 119 */ 120 120 page_table_lock(AS, true); 121 t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE) );121 t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), false); 122 122 if (!t || !PTE_VALID(t) || !PTE_PRESENT(t)) { 123 123 page_table_unlock(AS, true); … … 155 155 */ 156 156 page_table_lock(AS, true); 157 t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE) );157 t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), false); 158 158 if (!t || !PTE_VALID(t) || !PTE_PRESENT(t)) { 159 159 page_table_unlock(AS, true);
Note:
See TracChangeset
for help on using the changeset viewer.