Subversion Repositories HelenOS

Rev

Rev 2134 | Rev 3104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2134 Rev 2141
Line 155... Line 155...
155
     */
155
     */
156
    page_mapping_insert(AS, addr, frame, as_area_get_flags(area));
156
    page_mapping_insert(AS, addr, frame, as_area_get_flags(area));
157
    if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))
157
    if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))
158
        panic("Could not insert used space.\n");
158
        panic("Could not insert used space.\n");
159
       
159
       
160
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
161
    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 to
-
 
165
         * invalidate cachelines belonging to addr on all processors
-
 
166
         * so that they will be reloaded with the new content on next
-
 
167
         * 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
#endif
-
 
174
 
-
 
175
    return AS_PF_OK;
160
    return AS_PF_OK;
176
}
161
}
177
 
162
 
178
/** Free a frame that is backed by the anonymous memory backend.
163
/** Free a frame that is backed by the anonymous memory backend.
179
 *
164
 *
Line 238... Line 223...
238
    mutex_unlock(&area->sh_info->lock);
223
    mutex_unlock(&area->sh_info->lock);
239
}
224
}
240
 
225
 
241
/** @}
226
/** @}
242
 */
227
 */
243
 
-