/trunk/kernel/generic/src/mm/backend_anon.c |
---|
157,21 → 157,6 |
if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
panic("Could not insert used space.\n"); |
#ifdef CONFIG_VIRT_IDX_DCACHE |
if (dirty && PAGE_COLOR(PA2KA(frame)) != PAGE_COLOR(addr)) { |
/* |
* By writing to the frame using kernel virtual address, |
* we have created an illegal virtual alias. We now have to |
* invalidate cachelines belonging to addr on all processors |
* so that they will be reloaded with the new content on next |
* read. |
*/ |
dcache_flush_frame(addr, frame); |
dcache_shootdown_start(DCACHE_INVL_FRAME, PAGE_COLOR(addr), frame); |
dcache_shootdown_finalize(); |
} |
#endif |
return AS_PF_OK; |
} |
240,4 → 225,3 |
/** @} |
*/ |
/trunk/kernel/generic/src/mm/as.c |
---|
613,8 → 613,7 |
* such address space area, EPERM if there was a problem in accepting the area |
* or ENOMEM if there was a problem in allocating destination address space |
* area. ENOTSUP is returned if the address space area backend does not support |
* sharing or if the kernel detects an attempt to create an illegal address |
* alias. |
* sharing. |
*/ |
int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size, |
as_t *dst_as, uintptr_t dst_base, int dst_flags_mask) |
667,20 → 666,6 |
return EPERM; |
} |
#ifdef CONFIG_VIRT_IDX_DCACHE |
if (!(dst_flags_mask & AS_AREA_EXEC)) { |
if (PAGE_COLOR(src_area->base) != PAGE_COLOR(dst_base)) { |
/* |
* Refuse to create an illegal address alias. |
*/ |
mutex_unlock(&src_area->lock); |
mutex_unlock(&src_as->lock); |
interrupts_restore(ipl); |
return ENOTSUP; |
} |
} |
#endif /* CONFIG_VIRT_IDX_DCACHE */ |
/* |
* Now we are committed to sharing the area. |
* First, prepare the area for sharing. |
901,9 → 886,9 |
* list of inactive address spaces with assigned |
* ASID. |
*/ |
ASSERT(old_as->asid != ASID_INVALID); |
list_append(&old_as->inactive_as_with_asid_link, |
&inactive_as_with_asid_head); |
ASSERT(old_as->asid != ASID_INVALID); |
list_append(&old_as->inactive_as_with_asid_link, |
&inactive_as_with_asid_head); |
} |
mutex_unlock(&old_as->lock); |
/trunk/kernel/generic/src/mm/backend_elf.c |
---|
209,21 → 209,6 |
if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
panic("Could not insert used space.\n"); |
#ifdef CONFIG_VIRT_IDX_DCACHE |
if (dirty && PAGE_COLOR(PA2KA(frame)) != PAGE_COLOR(addr)) { |
/* |
* By writing to the frame using kernel virtual address, |
* we have created an illegal virtual alias. We now have to |
* invalidate cachelines belonging to addr on all processors |
* so that they will be reloaded with the new content on next |
* read. |
*/ |
dcache_flush_frame(addr, frame); |
dcache_shootdown_start(DCACHE_INVL_FRAME, PAGE_COLOR(addr), frame); |
dcache_shootdown_finalize(); |
} |
#endif |
return AS_PF_OK; |
} |
355,4 → 340,3 |
/** @} |
*/ |