From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 930F4606A322 for ; Fri, 4 Dec 2026 07:34:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XeNJg5CN; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=Xa/MQ/MT; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=/h9LTX8e DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=vkJ1/EwJIj8UidQsy6/rWvOkoGex6GZzEniRxdkV0OI=; b=XeNJg5CNlX3lqs +lvBhX8Q6fhYDFE86NdzT1Jw5VaRnBpiDuPAlA+Vm5wZG8FPa8RR7/HTpgeQGVFCQDbKwbWiH3JRp 53U/F/n4KjyyngXpoVXXUj4liDisb9/Ne5v75ctf3Pq5IE7F21zB/a289ubf/hhfGiAchYmarPR+w ITptHLrQ81F4s1pxTKa/N3PJ07/ragcYRzKcd/xU6J/U5nQQ67OTBkIX7Mu/lemYuEqDPGP6xdJI1 GBMuv/JuzvyrGwbljTaTJ9/tAFXrhCykHtVRSsCeKjWijvQMPge5clm9/P8dYGZ1XtFs6gJK4CF1R lYhZnd7N2034US3hBuLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNnN-0000000GxXH-07uW; Fri, 04 Dec 2026 07:33:31 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNla-0000000GwxC-2nPc; Fri, 04 Dec 2026 07:32:11 +0000 From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796369451; 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=vkJ1/EwJIj8UidQsy6/rWvOkoGex6GZzEniRxdkV0OI=; b=Xa/MQ/MTcu1irDtFfYkj2kGRUMsDQno0Fvm2hBN5PvC5NTCfu53xNl+bTYOlIS0b+QfxCh DK1JpNCIDZMvxkegVU15kfBCjvJ1vsLqcmKeOdClMgzjrqCTHkyGbP/CIIjPHNQCPvB3uF YpzQxBQZ8NGOaPhP30J4M/kDGjdvE6eSNYaVN6MEsoEeYLs6O9dJ2JdhNU80VHTEBM34C4 6QOfP+NUsIjsm6BiPl4eSxSuU/46OBiGOhR6Yssc+s2JOcCIWbFhdicF3wphioxE7OuWEe uD3pydG9dWj9co17uK9C4l/aTc5QP23Qy50RsLbjq7AxOK9yhjV2NDOEYw+LSw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796369451; 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=vkJ1/EwJIj8UidQsy6/rWvOkoGex6GZzEniRxdkV0OI=; b=/h9LTX8eIlmwezynPWXDF5P0VacnehDhFM8MIFklo3Vlw4geVbAv+vim1BodK1ZWRUBRHO IXrZALtMmcHXErBg== Date: Fri, 04 Dec 2026 08:30:34 +0100 Subject: [PATCH 7/9] riscv: vdso: Directly include the generic vDSO implementations X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20261204-vdso-generic-include-v1-7-8f4ed31bfbbd@linutronix.de> References: <20261204-vdso-generic-include-v1-0-8f4ed31bfbbd@linutronix.de> In-Reply-To: <20261204-vdso-generic-include-v1-0-8f4ed31bfbbd@linutronix.de> To: Thomas Gleixner , Andy Lutomirski , Vincenzo Frascino Cc: linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1796369447; l=2070; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Q3524/AxOzC7BFisMYWZaf6p2BnE65HaNi4U13abOqI=; b=ELHYcS1PbdTKNziwrdbqG19/JNLG9PtHA9woTAO6DhLs7JrS1ui49kl9kJznFAzQlEmLPrKjA hqLOJhlCN+hAegZIAMD46VePN4jIIhAc9tGKC7VyefcjmDeRapwr9rg X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_233153_422409_141019A0 X-CRM114-Status: UNSURE ( 7.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-16.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The inclusion of the generic vDSO implementation through compiler arguments is complicated and non-obvious. Directly include the .c files instead. Signed-off-by: Thomas Weißschuh --- arch/riscv/kernel/vdso/Makefile | 10 ++-------- arch/riscv/kernel/vdso/getrandom.c | 2 ++ arch/riscv/kernel/vdso/vgettimeofday.c | 2 ++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile index c023046a3fd7..f9ce25984bff 100644 --- a/arch/riscv/kernel/vdso/Makefile +++ b/arch/riscv/kernel/vdso/Makefile @@ -44,14 +44,8 @@ asflags-y += $(CFI_FULL) ccflags-remove-y += $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_LTO) -ifneq ($(c-gettimeofday-y),) - CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y) -endif - -ifneq ($(c-getrandom-y),) - CFLAGS_getrandom.o += -fPIC -include $(c-getrandom-y) -endif - +CFLAGS_vgettimeofday.o += -fPIC +CFLAGS_getrandom.o += -fPIC CFLAGS_hwprobe.o += -fPIC # Build rules diff --git a/arch/riscv/kernel/vdso/getrandom.c b/arch/riscv/kernel/vdso/getrandom.c index f21922e8cebd..05711a04f547 100644 --- a/arch/riscv/kernel/vdso/getrandom.c +++ b/arch/riscv/kernel/vdso/getrandom.c @@ -4,6 +4,8 @@ */ #include +#include "../../../../lib/vdso/getrandom.c" + ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len) { return __cvdso_getrandom(buffer, len, flags, opaque_state, opaque_len); diff --git a/arch/riscv/kernel/vdso/vgettimeofday.c b/arch/riscv/kernel/vdso/vgettimeofday.c index b35057802584..a7134b5aebd6 100644 --- a/arch/riscv/kernel/vdso/vgettimeofday.c +++ b/arch/riscv/kernel/vdso/vgettimeofday.c @@ -10,6 +10,8 @@ #include #include +#include "../../../../lib/vdso/gettimeofday.c" + int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) { return __cvdso_clock_gettime(clock, ts); -- 2.56.1