Re: [patch V2 08/17] clocksource: Add common vdso clock mode storage

From: Vincenzo Frascino
Date: Mon Feb 17 2020 - 05:37:03 EST


Hi Thomas,

On 07/02/2020 12:38, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> All architectures which use the generic VDSO code have their own storage
> for the VDSO clock mode. That's pointless and just requires duplicate code.
>
> Provide generic storage for it. The new Kconfig symbol is intermediate and
> will be removed once all architectures are converted over.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>


Reviewed-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
Tested-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>

> ---
> V2: Fix the unused variable warning and s/mode/clock_mode/ - Christophe
> ---
> include/linux/clocksource.h | 12 +++++++++++-
> kernel/time/clocksource.c | 9 +++++++++
> kernel/time/vsyscall.c | 10 ++++++++--
> lib/vdso/Kconfig | 3 +++
> lib/vdso/gettimeofday.c | 13 +++++++++++--
> 5 files changed, 42 insertions(+), 5 deletions(-)
>
> --- a/include/linux/clocksource.h
> +++ b/include/linux/clocksource.h
> @@ -23,10 +23,19 @@
> struct clocksource;
> struct module;
>
> -#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
> +#if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \
> + defined(CONFIG_GENERIC_VDSO_CLOCK_MODE)
> #include <asm/clocksource.h>
> #endif
>
> +enum vdso_clock_mode {
> + VDSO_CLOCKMODE_NONE,
> +#ifdef CONFIG_GENERIC_VDSO_CLOCK_MODE
> + VDSO_ARCH_CLOCKMODES,
> +#endif
> + VDSO_CLOCKMODE_MAX,
> +};
> +
As part of my work on common headers I will move this enumeration in
common/clocksource.h to be accessible by the vdso library. It will appear
in the next version of my patches once I rebase on yours.

--
Regards,
Vincenzo

Attachment: pEpkey.asc
Description: application/pgp-keys