[RFC PATCH 5/5] loongarch: Drop redundant internal header includes from the vDSO sources
From: Fang Xieyan
Date: Tue Dec 01 2026 - 05:24:32 EST
Patch 3 made the sanctioned headers self-contained via <vdso/types.h>,
so the direct <linux/types.h> includes in the loongarch vDSO sources
are dead weight: they are the only thing keeping the internal
<linux/types.h> -> <asm/...> -> bitsperlong chain alive inside these
vDSO translation units.
The vDSO Makefile already force-includes the sanctioned headers
(c-gettimeofday-y / c-getrandom-y), so dropping the includes brings
loongarch to the same shape as arm64, whose vDSO sources contain no
direct type includes at all.
Signed-off-by: Fang Xieyan <fangxy@xxxxxxxxxxxx>
---
Build-tested at this commit (= series tip): loongarch64 defconfig
cross-build (clang --target=loongarch64-linux-gnu) completes with 0
errors and still produces arch/loongarch/vdso/vdso.so(.dbg); the riscv
build was verified green in the same tree state.
arch/loongarch/vdso/vgetrandom.c | 1 -
arch/loongarch/vdso/vgettimeofday.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/arch/loongarch/vdso/vgetrandom.c b/arch/loongarch/vdso/vgetrandom.c
index d5f258ac4a36..0940972669ed 100644
--- a/arch/loongarch/vdso/vgetrandom.c
+++ b/arch/loongarch/vdso/vgetrandom.c
@@ -2,7 +2,6 @@
/*
* Copyright (C) 2024 Xi Ruoyao <xry111@xxxxxxxxxxx>. All Rights Reserved.
*/
-#include <linux/types.h>
ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
{
diff --git a/arch/loongarch/vdso/vgettimeofday.c b/arch/loongarch/vdso/vgettimeofday.c
index 0885c1f3a89d..8896d77bc66f 100644
--- a/arch/loongarch/vdso/vgettimeofday.c
+++ b/arch/loongarch/vdso/vgettimeofday.c
@@ -4,7 +4,6 @@
*
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
*/
-#include <linux/types.h>
#include <vdso/gettime.h>
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
--
2.50.1