From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796120665; b=WEh3x6sKEF75FmaaFV9WIVbx58F8ylDkNcYdYAALihfk6uwZBvqxCCP2Q8uljkh/GUiV 3/tTiK00f6KkazxIDu95pQS7u4OLBSPWPRSdsByWYY7fXvuglupVp3VFKf8ISftgwO8vN oimgAA6acHnHYkbj5ScDTt/L+BeEjCCzdl7S8SNvNm0NCKXm+OVQbxJzjtshrmNzZtOb1 4CAoaWkXFMa7jPn/UuTDLzmir15ssO1sJuipMB7tPJP02YD+cIVfNKb12lNJtWE5nKkB8 Ouzmu3Zh0QP+YbFiel51nP9FCjjBWG2rCsuS82rdPmmxgSxBpjPvC0GgwkDAaILk4gA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120665; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=oFOzqTxQoYPcFUt4qD9tifyKMV7RHaGbwhdUcbK4kUM=; b=2iI0nfBNFtuJ0SuM3xsGdtbc2UN9PFGPUpRROsecifCOSlvx00Nk0L5NAe3HrFPI3qlO k7Na6+Ep4bF+/IRMTuLlAuf7q6Lx4/SCuduzoGLrT+iEFS4zptIsRlE/KlmF875WX+Kg0 ZOD2zD8E2oE8SxQtBifyv3UITxbMGwymlFt1cBxgP2O7Bib00YrnRgh6e9+AiERU3eAcA EscHzFzffZ2FThSqAsKhT7yfabFFCLHq2IiLOyAClrkYOGUvK+cbj6b1zDgdxU7wcshSU klC9OOy1/gNpH26X5+p30dWqFqYz6v0oYHMhOXdtoP/Uw71fhaTB4VRr4fHgoO1Ul0Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=xiaopeng.com; spf=pass smtp.mailfrom=xiaopeng.com; dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=FfFEKkDr; arc=none smtp.remote-ip=115.124.28.5 Received: from out28-5.mail.aliyun.com (out28-5.mail.aliyun.com [115.124.28.5]) (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 E964A606A32A; Tue, 1 Dec 2026 10:24:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E964A606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xiaopeng.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xiaopeng.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=FfFEKkDr DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=xiaopeng.com; s=default; t=1796120660; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=oFOzqTxQoYPcFUt4qD9tifyKMV7RHaGbwhdUcbK4kUM=; b=FfFEKkDrcnG3zVUqHjv/730UItWtq2JZO/w4YPRt/QUMEIPVS188TDgW2PY1Opp4h5nsYkxk9oXIT4sC5+oDd37XMDPW9Ys22NTuSlWxJ6+7mAmLaemTHfRdo3NRTK/4Utmw5sb7LT5tIfhMQYgfrT0frHxb+UYeu2kY16mmu1k= X-Alimail-AntiSpam:AC=CONTINUE;BC=0.4588145|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0966345-0.0345618-0.868804;FP=13682532771564344802|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033037034184;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=19;RT=19;SR=0;TI=SMTPD_---.kE4ydGK_1796120657; Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.kE4ydGK_1796120657 cluster:ay29) by smtp.aliyun-inc.com; Tue, 01 Dec 2026 18:24:18 +0800 From: Fang Xieyan To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , x86@kernel.org Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , Arnd Bergmann , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Huacai Chen , WANG Xuerui , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [RFC PATCH 4/5] riscv: Drop redundant internal header includes from the vDSO sources Date: Tue, 1 Dec 2026 18:24:09 +0800 Message-ID: <20261201102410.44071-5-fangxy@xiaopeng.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261201102410.44071-1-fangxy@xiaopeng.com> References: <20261201102410.44071-1-fangxy@xiaopeng.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With the sanctioned headers providing all types through , the direct includes of internal headers in the riscv vDSO sources are dead weight: they are the only thing keeping the -> -> bitsperlong chain alive inside these vDSO translation units. The vDSO Makefile already force-includes the sanctioned headers (c-gettimeofday-y / c-getrandom-y), so the same code shape as the include-free arm64 vDSO sources can be used here. in vgettimeofday.c is redundant for the same reason: struct __kernel_timespec and friends reach the file through the same chain. hwprobe.c is left untouched: it still needs from the internal chain, a separate cleanup. Signed-off-by: Fang Xieyan --- Build-tested at the series tip (this patch and patch 5 both applied): riscv64 defconfig cross-build (clang --target=riscv64-linux-gnu) completes with 0 errors and still produces arch/riscv/kernel/vdso/vdso.so(.dbg); the riscv sources are identical between this commit and the tested tip. arch/riscv/kernel/vdso/getrandom.c | 1 - arch/riscv/kernel/vdso/vgettimeofday.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/arch/riscv/kernel/vdso/getrandom.c b/arch/riscv/kernel/vdso/getrandom.c index f21922e8cebd..6524e918c494 100644 --- a/arch/riscv/kernel/vdso/getrandom.c +++ b/arch/riscv/kernel/vdso/getrandom.c @@ -2,7 +2,6 @@ /* * Copyright (C) 2025 Xi Ruoyao . All Rights Reserved. */ -#include ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len) { diff --git a/arch/riscv/kernel/vdso/vgettimeofday.c b/arch/riscv/kernel/vdso/vgettimeofday.c index b35057802584..57bd32c5bf2b 100644 --- a/arch/riscv/kernel/vdso/vgettimeofday.c +++ b/arch/riscv/kernel/vdso/vgettimeofday.c @@ -6,8 +6,6 @@ * Copyright (C) 2020 SiFive */ -#include -#include #include int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) -- 2.50.1