From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3453E253B73; Fri, 24 Jul 2026 13:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784900291; cv=none; b=UwtjiPE2S4lIOu657+2+jwXhRMOAhMfGRy1xGMUC3TOW2jWjL/JUCQQezchkiB55zbjiSe6r6/qDr+s3+I//vV6k9exWxt5wnPGWo2KabNH9T2mBygqbN7N+tOKO+HAc0Kfz2g/qhJNXRnthoWydDdTzV4a8hXLkS4uzhL4yf7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784900291; c=relaxed/simple; bh=sXLjsimGUSXXUsc2qCiD2uC+XdCfB1PERWY6JkUJ0UM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bznqT3klOiPld7/dEnx0luQhtx+sh1+k/oRL9gmn6FYZRD+In8vkj1ePdAO/xnizXHGESMQK39v/lcN6AMgjStge8U2hpdLSY53x6+24TTigZHVVFV+9zgj0yzoZoIDxyETvIMa6rOyTM/t0Oc54yFryvCLZE2GP/XkdOmHu32E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LolrfjT1; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1yJn5T7c; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LolrfjT1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1yJn5T7c" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784900288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DETzi99iW5LSyN+yHRyHD/USkiX0xstftPX39RhkXRQ=; b=LolrfjT1ZGrmlYO3lelRd/aVORyCKK8u8LHEs2BF0CPZxtrSs34o3ETbtxQXZLrJT3GHkW 6xdSI+iQY2zJIJf55MvFtJI/vLyADG+NdN1Zxq3U7wgNdfdjsYWInb035OxjI7r9Kn5VQC YM5yk8cpElby5ltCNP4pHzr9k5eHi/TfCo0Fiy8n15+stdjouXdxHV7bNFnoUFa6VzCr4L 9/J+IGjlivsOOW3m6hbHOhsZLDvmZ7siI8goneELAAe8rDdMDeHXGf7VO+oPHlAX6uNGGN rtC8sZaCqtQRRVor3mDNBb2WAKtyr1jWxzvjj47RVo0XRsBRwThfNtj/33IzzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784900288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DETzi99iW5LSyN+yHRyHD/USkiX0xstftPX39RhkXRQ=; b=1yJn5T7c38mgra6MmxYGQjPXTkR8qdUsJwkbLwdHP5fN0xvA+PYhuJsNfoen+JYeufSEoT 86Pa5cItesv5l5Bg== Date: Fri, 24 Jul 2026 15:36:19 +0200 Subject: [PATCH v4 2/7] vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260724-vdso-arch-clockmodes-v4-2-ddbe447be860@linutronix.de> References: <20260724-vdso-arch-clockmodes-v4-0-ddbe447be860@linutronix.de> In-Reply-To: <20260724-vdso-arch-clockmodes-v4-0-ddbe447be860@linutronix.de> To: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Nathan Chancellor , Nicolas Schier , Thomas Bogendoerfer , Daniel Lezcano , Mark Rutland , Marc Zyngier , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Huacai Chen , WANG Xuerui Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1784900286; l=1748; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=sXLjsimGUSXXUsc2qCiD2uC+XdCfB1PERWY6JkUJ0UM=; b=YQZ4SJ9LKPw2mQO9sn76zUzwQfDIDMnEmscVXz+TzF1vluXpBJaS9RGdqqF/NblxiYNxs8IRa PiJSseFUHzVCchlR4q/bDKZC51QjWoXOGODpdcX2t+5nx4A9atnsJMK X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Some code, for example clocksource drivers, may want to use the vDSO clockmode constants even when CONFIG_GENERIC_GETTIMEOFDAY=n. But the symbols are completely hidden in that case, making ugly ifdeffery necessary. Always provide the enum definitions. As not all architectures provide asm/vdso/clocksource.h, provide an empty stub in asm-generic for it. Signed-off-by: Thomas Weißschuh --- include/asm-generic/Kbuild | 1 + include/asm-generic/vdso/clocksource.h | 0 include/vdso/clocksource.h | 4 +--- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index 15df9dcb42a5..2bc00c67dc54 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild @@ -62,6 +62,7 @@ mandatory-y += topology.h mandatory-y += trace_clock.h mandatory-y += uaccess.h mandatory-y += unwind_user.h +mandatory-y += vdso/clocksource.h mandatory-y += vermagic.h mandatory-y += vga.h mandatory-y += video.h diff --git a/include/asm-generic/vdso/clocksource.h b/include/asm-generic/vdso/clocksource.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/include/vdso/clocksource.h b/include/vdso/clocksource.h index c682e7c60273..bce81c02a7c6 100644 --- a/include/vdso/clocksource.h +++ b/include/vdso/clocksource.h @@ -4,13 +4,11 @@ #include -#ifdef CONFIG_GENERIC_GETTIMEOFDAY #include -#endif /* CONFIG_GENERIC_GETTIMEOFDAY */ enum vdso_clock_mode { VDSO_CLOCKMODE_NONE, -#ifdef CONFIG_GENERIC_GETTIMEOFDAY +#ifdef VDSO_ARCH_CLOCKMODES VDSO_ARCH_CLOCKMODES, #endif VDSO_CLOCKMODE_MAX, -- 2.55.0