clocksource: Remove obsolete ifdef
authorThomas Gleixner <tglx@linutronix.de>
Sat, 6 Jun 2020 21:51:15 +0000 (23:51 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 9 Jun 2020 14:36:47 +0000 (16:36 +0200)
CONFIG_GENERIC_VDSO_CLOCK_MODE was a transitional config switch which got
removed after all architectures got converted to the new storage model.

But the removal forgot to remove the #ifdef which guards the
vdso_clock_mode sanity check, which effectively disables the sanity check.

Remove it now.

Fixes: f86fd32db706 ("lib/vdso: Cleanup clock mode storage leftovers")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20200606221531.845475036@linutronix.de
kernel/time/clocksource.c

index 7cb09c4cf21c8cd4f55f00bf0aeb311e4523b2a5..02441ead3c3bb05d3a2828e567775e0d374df5b6 100644 (file)
@@ -928,14 +928,12 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
 
        clocksource_arch_init(cs);
 
-#ifdef CONFIG_GENERIC_VDSO_CLOCK_MODE
        if (cs->vdso_clock_mode < 0 ||
            cs->vdso_clock_mode >= VDSO_CLOCKMODE_MAX) {
                pr_warn("clocksource %s registered with invalid VDSO mode %d. Disabling VDSO support.\n",
                        cs->name, cs->vdso_clock_mode);
                cs->vdso_clock_mode = VDSO_CLOCKMODE_NONE;
        }
-#endif
 
        /* Initialize mult/shift and max_idle_ns */
        __clocksource_update_freq_scale(cs, scale, freq);