// SPDX-License-Identifier: GPL-2.0 /* * Copyright 2019 ARM Ltd. * * Generic implementation of update_vsyscall and update_vsyscall_tz. * * Based on the x86 specific implementation.
*/
/* * Read without the seqlock held by clock_getres().
*/
WRITE_ONCE(vdata->hrtimer_res, hrtimer_resolution);
/* * If the current clocksource is not VDSO capable, then spare the * update of the high resolution parts.
*/ if (clock_mode != VDSO_CLOCKMODE_NONE)
update_vdso_time_data(vdata, tk);
/** * vdso_update_begin - Start of a VDSO update section * * Allows architecture code to safely update the architecture specific VDSO * data. Disables interrupts, acquires timekeeper lock to serialize against * concurrent updates from timekeeping and invalidates the VDSO data * sequence counter to prevent concurrent readers from accessing * inconsistent data. * * Returns: Saved interrupt flags which need to be handed in to * vdso_update_end().
*/ unsignedlong vdso_update_begin(void)
{ struct vdso_time_data *vdata = vdso_k_time_data; unsignedlong flags = timekeeper_lock_irqsave();
vdso_write_begin(vdata); return flags;
}
/** * vdso_update_end - End of a VDSO update section * @flags: Interrupt flags as returned from vdso_update_begin() * * Pairs with vdso_update_begin(). Marks vdso data consistent, invokes data * synchronization if the architecture requires it, drops timekeeper lock * and restores interrupt flags.
*/ void vdso_update_end(unsignedlong flags)
{ struct vdso_time_data *vdata = vdso_k_time_data;
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.