Commit f48955e0 authored by Anna-Maria Behnsen's avatar Anna-Maria Behnsen Committed by Thomas Gleixner

vdso/gettimeofday: Clarify comment about open coded function

The two comments state, that the following code open codes something but
they lack to specify what exactly is open coded.

Expand comments by mentioning the reference to the open coded function.
Signed-off-by: default avatarAnna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-1-36eb64e7ece2@linutronix.de
parent e1b6a78b
...@@ -140,14 +140,14 @@ static __always_inline int do_hres(const struct vdso_data *vd, clockid_t clk, ...@@ -140,14 +140,14 @@ static __always_inline int do_hres(const struct vdso_data *vd, clockid_t clk,
do { do {
/* /*
* Open coded to handle VDSO_CLOCKMODE_TIMENS. Time namespace * Open coded function vdso_read_begin() to handle
* enabled tasks have a special VVAR page installed which * VDSO_CLOCKMODE_TIMENS. Time namespace enabled tasks have a
* has vd->seq set to 1 and vd->clock_mode set to * special VVAR page installed which has vd->seq set to 1 and
* VDSO_CLOCKMODE_TIMENS. For non time namespace affected tasks * vd->clock_mode set to VDSO_CLOCKMODE_TIMENS. For non time
* this does not affect performance because if vd->seq is * namespace affected tasks this does not affect performance
* odd, i.e. a concurrent update is in progress the extra * because if vd->seq is odd, i.e. a concurrent update is in
* check for vd->clock_mode is just a few extra * progress the extra check for vd->clock_mode is just a few
* instructions while spin waiting for vd->seq to become * extra instructions while spin waiting for vd->seq to become
* even again. * even again.
*/ */
while (unlikely((seq = READ_ONCE(vd->seq)) & 1)) { while (unlikely((seq = READ_ONCE(vd->seq)) & 1)) {
...@@ -223,8 +223,8 @@ static __always_inline int do_coarse(const struct vdso_data *vd, clockid_t clk, ...@@ -223,8 +223,8 @@ static __always_inline int do_coarse(const struct vdso_data *vd, clockid_t clk,
do { do {
/* /*
* Open coded to handle VDSO_CLOCK_TIMENS. See comment in * Open coded function vdso_read_begin() to handle
* do_hres(). * VDSO_CLOCK_TIMENS. See comment in do_hres().
*/ */
while ((seq = READ_ONCE(vd->seq)) & 1) { while ((seq = READ_ONCE(vd->seq)) & 1) {
if (IS_ENABLED(CONFIG_TIME_NS) && if (IS_ENABLED(CONFIG_TIME_NS) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment