Changeset 2057572 in mainline for kernel/generic/src/mm
- Timestamp:
- 2007-03-27T23:40:25Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 399ece9
- Parents:
- 8d37a06
- Location:
- kernel/generic/src/mm
- Files:
-
- 3 edited
-
as.c (modified) (3 diffs)
-
backend_anon.c (modified) (2 diffs)
-
backend_elf.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r8d37a06 r2057572 614 614 * or ENOMEM if there was a problem in allocating destination address space 615 615 * area. ENOTSUP is returned if the address space area backend does not support 616 * sharing or if the kernel detects an attempt to create an illegal address 617 * alias. 616 * sharing. 618 617 */ 619 618 int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size, … … 667 666 return EPERM; 668 667 } 669 670 #ifdef CONFIG_VIRT_IDX_DCACHE671 if (!(dst_flags_mask & AS_AREA_EXEC)) {672 if (PAGE_COLOR(src_area->base) != PAGE_COLOR(dst_base)) {673 /*674 * Refuse to create an illegal address alias.675 */676 mutex_unlock(&src_area->lock);677 mutex_unlock(&src_as->lock);678 interrupts_restore(ipl);679 return ENOTSUP;680 }681 }682 #endif /* CONFIG_VIRT_IDX_DCACHE */683 668 684 669 /* … … 902 887 * ASID. 903 888 */ 904 ASSERT(old_as->asid != ASID_INVALID);905 list_append(&old_as->inactive_as_with_asid_link,906 &inactive_as_with_asid_head);889 ASSERT(old_as->asid != ASID_INVALID); 890 list_append(&old_as->inactive_as_with_asid_link, 891 &inactive_as_with_asid_head); 907 892 } 908 893 mutex_unlock(&old_as->lock); -
kernel/generic/src/mm/backend_anon.c
r8d37a06 r2057572 158 158 panic("Could not insert used space.\n"); 159 159 160 #ifdef CONFIG_VIRT_IDX_DCACHE161 if (dirty && PAGE_COLOR(PA2KA(frame)) != PAGE_COLOR(addr)) {162 /*163 * By writing to the frame using kernel virtual address,164 * we have created an illegal virtual alias. We now have to165 * invalidate cachelines belonging to addr on all processors166 * so that they will be reloaded with the new content on next167 * read.168 */169 dcache_flush_frame(addr, frame);170 dcache_shootdown_start(DCACHE_INVL_FRAME, PAGE_COLOR(addr), frame);171 dcache_shootdown_finalize();172 }173 #endif174 175 160 return AS_PF_OK; 176 161 } … … 241 226 /** @} 242 227 */ 243 -
kernel/generic/src/mm/backend_elf.c
r8d37a06 r2057572 209 209 if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) 210 210 panic("Could not insert used space.\n"); 211 212 #ifdef CONFIG_VIRT_IDX_DCACHE213 if (dirty && PAGE_COLOR(PA2KA(frame)) != PAGE_COLOR(addr)) {214 /*215 * By writing to the frame using kernel virtual address,216 * we have created an illegal virtual alias. We now have to217 * invalidate cachelines belonging to addr on all processors218 * so that they will be reloaded with the new content on next219 * read.220 */221 dcache_flush_frame(addr, frame);222 dcache_shootdown_start(DCACHE_INVL_FRAME, PAGE_COLOR(addr), frame);223 dcache_shootdown_finalize();224 }225 #endif226 211 227 212 return AS_PF_OK; … … 356 341 /** @} 357 342 */ 358
Note:
See TracChangeset
for help on using the changeset viewer.
