Commit 9a6b55ac authored by Thomas Gleixner's avatar Thomas Gleixner

lib/vdso: Make __arch_update_vdso_data() logic understandable

The function name suggests that this is a boolean checking whether the
architecture asks for an update of the VDSO data, but it works the other
way round. To spare further confusion invert the logic.

Fixes: 44f57d78 ("timekeeping: Provide a generic update_vsyscall() implementation")
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200114185946.656652824@linutronix.de
parent de95a991
...@@ -34,9 +34,9 @@ struct vdso_data *__arm_get_k_vdso_data(void) ...@@ -34,9 +34,9 @@ struct vdso_data *__arm_get_k_vdso_data(void)
#define __arch_get_k_vdso_data __arm_get_k_vdso_data #define __arch_get_k_vdso_data __arm_get_k_vdso_data
static __always_inline static __always_inline
int __arm_update_vdso_data(void) bool __arm_update_vdso_data(void)
{ {
return !cntvct_ok; return cntvct_ok;
} }
#define __arch_update_vdso_data __arm_update_vdso_data #define __arch_update_vdso_data __arm_update_vdso_data
......
...@@ -12,9 +12,9 @@ static __always_inline struct vdso_data *__arch_get_k_vdso_data(void) ...@@ -12,9 +12,9 @@ static __always_inline struct vdso_data *__arch_get_k_vdso_data(void)
#endif /* __arch_get_k_vdso_data */ #endif /* __arch_get_k_vdso_data */
#ifndef __arch_update_vdso_data #ifndef __arch_update_vdso_data
static __always_inline int __arch_update_vdso_data(void) static __always_inline bool __arch_update_vdso_data(void)
{ {
return 0; return true;
} }
#endif /* __arch_update_vdso_data */ #endif /* __arch_update_vdso_data */
......
...@@ -84,7 +84,7 @@ void update_vsyscall(struct timekeeper *tk) ...@@ -84,7 +84,7 @@ void update_vsyscall(struct timekeeper *tk)
struct vdso_timestamp *vdso_ts; struct vdso_timestamp *vdso_ts;
u64 nsec; u64 nsec;
if (__arch_update_vdso_data()) { if (!__arch_update_vdso_data()) {
/* /*
* Some architectures might want to skip the update of the * Some architectures might want to skip the update of the
* data page. * data page.
......
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