Re: [PATCH 3/7] MIPS: csrc-r4k: Replace CONFIG_GENERIC_GETTIMEOFDAY ifdeffery with IS_ENABLED()

Thomas Gleixner <[email protected]> Wed, 15 Jul 2026 10:25:19 +0200
Newsgroups gmane.linux.ports.mips,gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.kbuild.devel,gmane.linux.ports.arm.kernel,gmane.linux.ports.riscv
Message-ID <87wluwoe1c.ffs@fw13>
On Thu, Jul 09 2026 at 13:32, Thomas Weißschuh wrote:
> Now that there is a dummy declaration of VDSO_CLOCKMODE_R4K, even if no
> vDSO is built, the ugly ifdeffery can be replaced with a cleaner
> IS_ENABLED() check.

Duh. This stuff is really obfuscated. I just realized that the previous
one actually expands the architecture defines to non-defined integer
variable declarations.

Smart, but seriously?

I just double checked and it turns out that none of this ifdeffery is
required. If CONFIG_GENERIC_GETTIMEOFDAY is disabled, then it does not
matter at all whether the actual ARCH_CLOCK_VDSO_MODE is set in
clocksource::vdso_mode or not.

Nothing uses the vdso mode field outside of update_vsyscall and that's
compiled out when CONFIG_GENERIC_GETTIMEOFDAY=n.

So all what's required is:

--- a/include/vdso/clocksource.h
+++ b/include/vdso/clocksource.h
@@ -3,14 +3,11 @@
 #define __VDSO_CLOCKSOURCE_H
 
 #include <vdso/limits.h>