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 CD93B606A681 for ; Fri, 4 Dec 2026 07:34:34 +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=0uBKpbt4; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=PNrF7soJ; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=Qkzx5MnF 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=1j4B1ERY4ZS/O/7sB8x3a0Pg9yV2kr2CWauDoHcJ3U0=; b=0uBKpbt4E78D79 /18Tuf/iY4HTsqaMtAWnViGaIAFKtmUap853TBC24IT+mEzUzcX5srjaVUaVmlpyWVIdvqbGhQwxU rJanBc9gDWwyDimb1j1QLxOOCXNa9q5HUGZdR6QdVLCjdC0UWo5G9Yfgy2euTnZRxA/Wr4Ukk+g69 CG3T/i1SqVch4PicubaJCaiT0PpAq3tBxGZ6PjFJ3To6uBnjU5jh8Q4lMN/hqMxArfFZLvuGtcSjA 8vNQMTs1nPgEOCX8KtnbE4Lzn3y8qigAQFuF/IHhrAMy+skk93kECsxaeMpkV+AKI2/WRLUqLtutu FvvyJ1lciGNQucAm2XOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNnp-0000000Gxjk-1ZYM; Fri, 04 Dec 2026 07:34:01 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZNla-0000000Gwx8-2Dmm; Fri, 04 Dec 2026 07:32:18 +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=1796369450; 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=1j4B1ERY4ZS/O/7sB8x3a0Pg9yV2kr2CWauDoHcJ3U0=; b=PNrF7soJ3U8OGsldTdofjcHFa9HOZpif5xfN0w4bdzIoCbK/119FGzVvMmLdp+8S1uD3AW fAMuGlVSAhALopbOqN3RJyQBpXq1Tkf+K9PHzQCQh8TKEBSX5r6FEux0Caqa0Y1LRH2e72 bUwf8DaItR/Fu8MUUnnlXQYLsvSw/AUdGDlBPVsY2isCV/py2ajkGnIyBASy4DCIFqLvLC CrWbFJVHd0DQZsgMFZ3UziiwHQY+Pyv+tt9w+mP0h92ACoCsQPW3Zsqc/MZ8aS8zvX0b7y s1H2gVoZDowTjtYefoCJMZ49S0O4TnnHTk73XDuMKnbs4RKPZ6SORnvWZGp62g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796369450; 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=1j4B1ERY4ZS/O/7sB8x3a0Pg9yV2kr2CWauDoHcJ3U0=; b=Qkzx5MnF+xyUXLAeXpy0ELiftBnLoDGWVBX0P69cYMlrIWfXRVtO0qf4UrZ0veBsQ6Mv3h 8m9YjdS9YC0bXkBw== Date: Fri, 04 Dec 2026 08:30:32 +0100 Subject: [PATCH 5/9] powerpc/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-5-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=2610; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=XEfc4F7KLKzRKhBCdfvKkyGNifLGyAsJ3Yp9Q/iFCps=; b=QFpeJa7YFwC+bJg/gPXnPi8K2ah7TBed7kyJBFKNoH1uf7Tn8X3X4N3N4YPHZseI4sfdmpVlR 7G/IBBRqvsmAUpWClBr1QvPh7ZMFDPpe9+FF/3xLGcXHKrPld5CajQO 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_233156_029483_58C23397 X-CRM114-Status: UNSURE ( 9.46 ) 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/powerpc/kernel/vdso/Makefile | 10 +--------- arch/powerpc/kernel/vdso/vgetrandom.c | 2 ++ arch/powerpc/kernel/vdso/vgettimeofday.c | 2 ++ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile index 0d1a49529885..386eb3778934 100644 --- a/arch/powerpc/kernel/vdso/Makefile +++ b/arch/powerpc/kernel/vdso/Makefile @@ -11,19 +11,11 @@ obj-vdso64 = sigtramp64-64.o gettimeofday-64.o datapage-64.o cacheflush-64.o not obj-vdso32 += getrandom-32.o vgetrandom-chacha-32.o obj-vdso64 += getrandom-64.o vgetrandom-chacha-64.o -ifneq ($(c-gettimeofday-y),) - CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y) # Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true # by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is # compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code # generation is minimal, it will just use r29 instead. - CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call cc-option, -ffixed-r30) -endif - -ifneq ($(c-getrandom-y),) - CFLAGS_vgetrandom-32.o += -include $(c-getrandom-y) - CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y) -endif +CFLAGS_vgettimeofday-64.o += $(call cc-option, -ffixed-r30) # Build rules diff --git a/arch/powerpc/kernel/vdso/vgetrandom.c b/arch/powerpc/kernel/vdso/vgetrandom.c index cc79b960a541..e164e2052615 100644 --- a/arch/powerpc/kernel/vdso/vgetrandom.c +++ b/arch/powerpc/kernel/vdso/vgetrandom.c @@ -7,6 +7,8 @@ #include #include +#include "../../../../lib/vdso/getrandom.c" + ssize_t __c_kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len) { diff --git a/arch/powerpc/kernel/vdso/vgettimeofday.c b/arch/powerpc/kernel/vdso/vgettimeofday.c index 4b712fb01a3f..11a69411e04a 100644 --- a/arch/powerpc/kernel/vdso/vgettimeofday.c +++ b/arch/powerpc/kernel/vdso/vgettimeofday.c @@ -5,6 +5,8 @@ #include #include +#include "../../../../lib/vdso/gettimeofday.c" + #ifdef __powerpc64__ int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts, const struct vdso_time_data *vd) -- 2.56.1