Rev 2134 | Rev 2467 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2134 | Rev 2141 | ||
|---|---|---|---|
| Line 207... | Line 207... | ||
| 207 | 207 | ||
| 208 | page_mapping_insert(AS, addr, frame, as_area_get_flags(area)); |
208 | page_mapping_insert(AS, addr, frame, as_area_get_flags(area)); |
| 209 | if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
209 | if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
| 210 | panic("Could not insert used space.\n"); |
210 | panic("Could not insert used space.\n"); |
| 211 | 211 | ||
| 212 | #ifdef CONFIG_VIRT_IDX_DCACHE |
- | |
| 213 | 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 to |
- | |
| 217 | * invalidate cachelines belonging to addr on all processors |
- | |
| 218 | * so that they will be reloaded with the new content on next |
- | |
| 219 | * 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 | #endif |
- | |
| 226 | - | ||
| 227 | return AS_PF_OK; |
212 | return AS_PF_OK; |
| 228 | } |
213 | } |
| 229 | 214 | ||
| 230 | /** Free a frame that is backed by the ELF backend. |
215 | /** Free a frame that is backed by the ELF backend. |
| 231 | * |
216 | * |
| Line 353... | Line 338... | ||
| 353 | mutex_unlock(&area->sh_info->lock); |
338 | mutex_unlock(&area->sh_info->lock); |
| 354 | } |
339 | } |
| 355 | 340 | ||
| 356 | /** @} |
341 | /** @} |
| 357 | */ |
342 | */ |
| 358 | - | ||