/* * Determine total area size. This includes the VDSO data itself, the * data page, and the GIC user page if present. Always create a mapping * for the GIC user area if the GIC is present regardless of whether it * is the current clocksource, in case it comes into use later on. We * only map a page even though the total area is 64K, as we only need * the counter registers at the start.
*/
gic_size = mips_gic_present() ? PAGE_SIZE : 0;
size = gic_size + VDSO_NR_PAGES * PAGE_SIZE + image->size;
/* * Find a region that's large enough for us to perform the * colour-matching alignment below.
*/ if (cpu_has_dc_aliases)
size += shm_align_mask + 1;
base = get_unmapped_area(NULL, vdso_base(), size, 0, 0); if (IS_ERR_VALUE(base)) {
ret = base; goto out;
}
/* * If we suffer from dcache aliasing, ensure that the VDSO data page * mapping is coloured the same as the kernel's mapping of that memory. * This ensures that when the kernel updates the VDSO data userland * will observe it without requiring cache invalidations.
*/ if (cpu_has_dc_aliases) {
base = __ALIGN_MASK(base, shm_align_mask);
base += ((unsignedlong)vdso_k_time_data - gic_size) & shm_align_mask;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.