From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.219 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796126143; b=YN860VBSyJtOPePkGaXW2Dn3nAcRd29k/rQTqoq1/Uot0T4N6E34PymqWBSTln6pCjq0 dwWdz8a58WnHM6w4wtVYUzKGwX1BZra59ckGzL0OqJZejyc60BdOWVR6D6ev8D1CHCu4B c/iD/lYZgfL+IZ/Q44A3lbzohPsSXN26lVlsnzZqZ/cx7Xza7yaw8OJqcg5mdnU7PENEO MPRDn+ui5te6U8TVtU3/rjQTpVKgEXw+w1xjmO5UvgZDCOmvUP8AhMukiXoJ8rfnOD5IM cFAiJK9N7wa6U02d3P9PcSrkxMyuOvh3+YhtWWnn5B6/v93eYqYOr3y14tem8LPSUGQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126143; 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=yUZEKSFYYCHIL1sStgBnA9nadcjSGvuaiQux63QfsYVVBYAIpJjN2jgfx/DpTrBhoHM/ Z1DwfGm+v3Me13CVMuLDQP9pv10yd5H3fsNsZ8D+PcZVYgEUeDsZ4Zo1EfNpXPkl6anO1 CcyLaIDkvbka5oapp9BEfjpYHr2otBBwf0j2/nD//nEx79NJ/oirteCg9cB7Fydfhou2Z t1mWdDMrKN9G6iVDtfkrxX6JkKhYqBP7PdKL89DSguxffQA345c5nzsnv5N+R+zjzQNQq T7lCubQJL5al/JMxAN/Ky4TQzM9ry5X5WwxIYey+X4O+TkO8p9nRKeFZlRvGcesSeOg== 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=EZHw6lYR; arc=none smtp.remote-ip=115.124.28.219 Received: from out28-219.mail.aliyun.com (out28-219.mail.aliyun.com [115.124.28.219]) (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 61E8D606A680; Tue, 1 Dec 2026 11:55:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 61E8D606A680 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=EZHw6lYR DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=xiaopeng.com; s=default; t=1796126133; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=oFOzqTxQoYPcFUt4qD9tifyKMV7RHaGbwhdUcbK4kUM=; b=EZHw6lYR4t2xk7D/G7fSa7wCMsaWo3Rz1DN5O8Aw1Dj+7InLRvL8BBbek3O7rMusBhVQMHyyI2ni6wMr4EbjHONQT1WqOL/QU5jBLUpozx0eweoJA8SmjE3hw6Wk0lCb16H65NqGlDzx+Kl9vSkBX6dHCTrXLqxyhpDYqg1ctfU= 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|8|2|18|0|-1|-1|-1;HT=maildocker-contentspam033037028158;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=19;RT=19;SR=0;TI=SMTPD_---.kEK1TlJ_1796126130; Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.kEK1TlJ_1796126130 cluster:ay29) by smtp.aliyun-inc.com; Tue, 01 Dec 2026 19:55:31 +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 19:55:22 +0800 Message-ID: <20261201115523.75606-5-fangxy@xiaopeng.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261201115523.75606-1-fangxy@xiaopeng.com> References: <20261201115523.75606-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