* [PATCH 1/3] MIPS: vdso: Drop the include of asm/clocksource.h
2026-12-04 7:26 [PATCH 0/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
@ 2026-12-04 7:26 ` Thomas Weißschuh
2026-12-04 7:26 ` [PATCH 2/3] x86/vdso: Drop the include of asm/vdso/clocksource.h Thomas Weißschuh
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2026-12-04 7:26 UTC (permalink / raw)
To: Thomas Gleixner, John Stultz, Stephen Boyd, Miroslav Lichvar
Cc: linux-mips, linux-kernel, linux-arm-kernel, linux-csky, loongarch,
linuxppc-dev, linux-riscv, linux-s390, sparclinux,
Thomas Weißschuh
The inclusion is not necessary and the header will go away soon.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/mips/include/asm/vdso/gettimeofday.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
index 32d2d173fdc0..807cddd090ce 100644
--- a/arch/mips/include/asm/vdso/gettimeofday.h
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
@@ -14,7 +14,6 @@
#ifndef __ASSEMBLER__
#include <asm/vdso/vdso.h>
-#include <asm/clocksource.h>
#include <asm/unistd.h>
#include <asm/vdso.h>
--
2.56.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] x86/vdso: Drop the include of asm/vdso/clocksource.h
2026-12-04 7:26 [PATCH 0/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
2026-12-04 7:26 ` [PATCH 1/3] MIPS: vdso: Drop the include " Thomas Weißschuh
@ 2026-12-04 7:26 ` Thomas Weißschuh
2026-12-04 7:26 ` [PATCH 3/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
2026-12-04 7:36 ` [PATCH 0/3] " sashiko-bot
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2026-12-04 7:26 UTC (permalink / raw)
To: Thomas Gleixner, John Stultz, Stephen Boyd, Miroslav Lichvar
Cc: linux-mips, linux-kernel, linux-arm-kernel, linux-csky, loongarch,
linuxppc-dev, linux-riscv, linux-s390, sparclinux,
Thomas Weißschuh
The inclusion is not necessary.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/x86/include/asm/clocksource.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/include/asm/clocksource.h b/arch/x86/include/asm/clocksource.h
index dc9dc7b3911a..70f0981d212c 100644
--- a/arch/x86/include/asm/clocksource.h
+++ b/arch/x86/include/asm/clocksource.h
@@ -4,8 +4,6 @@
#ifndef _ASM_X86_CLOCKSOURCE_H
#define _ASM_X86_CLOCKSOURCE_H
-#include <asm/vdso/clocksource.h>
-
extern unsigned int vclocks_used;
static inline bool vclock_was_used(int vclock)
--
2.56.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] clocksource: Drop the inclusion of asm/clocksource.h
2026-12-04 7:26 [PATCH 0/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
2026-12-04 7:26 ` [PATCH 1/3] MIPS: vdso: Drop the include " Thomas Weißschuh
2026-12-04 7:26 ` [PATCH 2/3] x86/vdso: Drop the include of asm/vdso/clocksource.h Thomas Weißschuh
@ 2026-12-04 7:26 ` Thomas Weißschuh
2026-12-04 7:36 ` sashiko-bot
2026-12-04 7:36 ` [PATCH 0/3] " sashiko-bot
3 siblings, 1 reply; 6+ messages in thread
From: Thomas Weißschuh @ 2026-12-04 7:26 UTC (permalink / raw)
To: Thomas Gleixner, John Stultz, Stephen Boyd, Miroslav Lichvar
Cc: linux-mips, linux-kernel, linux-arm-kernel, linux-csky, loongarch,
linuxppc-dev, linux-riscv, linux-s390, sparclinux,
Thomas Weißschuh
Only x86 requires asm/clocksource.h. As the generic vDSO infrastructure
includes this header all other architectures are force to provide it.
But on x86 all users of the header already include it explicitly,
making the inclusion from linux/clocksource.h unnecessary.
Drop the inclusion of asm/clocksource.h from linux/clocksource.h.
Also remove all the now unused architecture-specific files.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/arm/include/asm/clocksource.h | 7 -------
arch/arm64/include/asm/clocksource.h | 7 -------
arch/csky/include/asm/clocksource.h | 8 --------
arch/loongarch/include/asm/clocksource.h | 12 ------------
arch/mips/include/asm/clocksource.h | 11 -----------
arch/powerpc/include/asm/clocksource.h | 7 -------
arch/riscv/include/asm/clocksource.h | 7 -------
arch/s390/include/asm/clocksource.h | 7 -------
arch/sparc/include/asm/clocksource.h | 8 --------
include/linux/clocksource.h | 4 ----
10 files changed, 78 deletions(-)
diff --git a/arch/arm/include/asm/clocksource.h b/arch/arm/include/asm/clocksource.h
deleted file mode 100644
index 13651c731a81..000000000000
--- a/arch/arm/include/asm/clocksource.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_CLOCKSOURCE_H
-#define _ASM_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif /* _ASM_CLOCKSOURCE_H */
diff --git a/arch/arm64/include/asm/clocksource.h b/arch/arm64/include/asm/clocksource.h
deleted file mode 100644
index 482185566b0c..000000000000
--- a/arch/arm64/include/asm/clocksource.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_CLOCKSOURCE_H
-#define _ASM_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif
diff --git a/arch/csky/include/asm/clocksource.h b/arch/csky/include/asm/clocksource.h
deleted file mode 100644
index 54da0e49efa1..000000000000
--- a/arch/csky/include/asm/clocksource.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef __ASM_VDSO_CSKY_CLOCKSOURCE_H
-#define __ASM_VDSO_CSKY_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif
diff --git a/arch/loongarch/include/asm/clocksource.h b/arch/loongarch/include/asm/clocksource.h
deleted file mode 100644
index 58e64aa05d26..000000000000
--- a/arch/loongarch/include/asm/clocksource.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Author: Huacai Chen <chenhuacai@loongson.cn>
- * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
- */
-
-#ifndef __ASM_CLOCKSOURCE_H
-#define __ASM_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif /* __ASM_CLOCKSOURCE_H */
diff --git a/arch/mips/include/asm/clocksource.h b/arch/mips/include/asm/clocksource.h
deleted file mode 100644
index 2f1ebbea3d72..000000000000
--- a/arch/mips/include/asm/clocksource.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2015 Imagination Technologies
- * Author: Alex Smith <alex.smith@imgtec.com>
- */
-#ifndef __ASM_CLOCKSOURCE_H
-#define __ASM_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif /* __ASM_CLOCKSOURCE_H */
diff --git a/arch/powerpc/include/asm/clocksource.h b/arch/powerpc/include/asm/clocksource.h
deleted file mode 100644
index 0a26ef13a34a..000000000000
--- a/arch/powerpc/include/asm/clocksource.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_POWERPC_CLOCKSOURCE_H
-#define _ASM_POWERPC_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif /* _ASM_POWERPC_CLOCKSOURCE_H */
diff --git a/arch/riscv/include/asm/clocksource.h b/arch/riscv/include/asm/clocksource.h
deleted file mode 100644
index 482185566b0c..000000000000
--- a/arch/riscv/include/asm/clocksource.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_CLOCKSOURCE_H
-#define _ASM_CLOCKSOURCE_H
-
-#include <asm/vdso/clocksource.h>
-
-#endif
diff --git a/arch/s390/include/asm/clocksource.h b/arch/s390/include/asm/clocksource.h
deleted file mode 100644
index 03434369fce4..000000000000
--- a/arch/s390/include/asm/clocksource.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* s390-specific clocksource additions */
-
-#ifndef _ASM_S390_CLOCKSOURCE_H
-#define _ASM_S390_CLOCKSOURCE_H
-
-#endif /* _ASM_S390_CLOCKSOURCE_H */
diff --git a/arch/sparc/include/asm/clocksource.h b/arch/sparc/include/asm/clocksource.h
deleted file mode 100644
index 68303ad26eb2..000000000000
--- a/arch/sparc/include/asm/clocksource.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _ASM_SPARC_CLOCKSOURCE_H
-#define _ASM_SPARC_CLOCKSOURCE_H
-
-#endif /* _ASM_SPARC_CLOCKSOURCE_H */
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 283d7297aa79..f5939229697c 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -25,10 +25,6 @@ struct clocksource_base;
struct clocksource;
struct module;
-#if defined(CONFIG_GENERIC_GETTIMEOFDAY)
-#include <asm/clocksource.h>
-#endif
-
#include <vdso/clocksource.h>
/**
--
2.56.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] clocksource: Drop the inclusion of asm/clocksource.h
2026-12-04 7:26 ` [PATCH 3/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
@ 2026-12-04 7:36 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-12-04 7:36 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: linux-s390, sparclinux, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] clocksource: hyperv_timer build failure due to missing
vclocks_set_used()
--
commit 516c29910a9a9523a64fdf7b4abc3277fa3ca576
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
clocksource: Drop the inclusion of asm/clocksource.h
This commit removes the inclusion of asm/clocksource.h from
include/linux/clocksource.h and deletes the unused asm/clocksource.h
headers for non-x86 architectures.
> diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
> index 283d7297aa79b..f5939229697c0 100644
> --- a/include/linux/clocksource.h
> +++ b/include/linux/clocksource.h
> @@ -25,10 +25,6 @@ struct clocksource_base;
> struct clocksource;
> struct module;
>
> -#if defined(CONFIG_GENERIC_GETTIMEOFDAY)
> -#include <asm/clocksource.h>
> -#endif
> -
> #include <vdso/clocksource.h>
>
> /**
[Severity: High]
Does dropping this include break x86 builds with CONFIG_HYPERV=y?
On x86, drivers/clocksource/hyperv_timer.c gets HAVE_VDSO_CLOCKMODE_HVCLOCK
from vdso/clocksource.h, so hv_cs_enable() compiles and calls
vclocks_set_used(). That helper is only defined in
arch/x86/include/asm/clocksource.h, which hyperv_timer.c no longer includes.
Including asm/clocksource.h in arch/x86/include/asm/hyperv_timer.h would
keep the declaration visible and avoid the build failure.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-vdso-asm-clocksource-v1-0-6fae836f286b@linutronix.de?part=3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] clocksource: Drop the inclusion of asm/clocksource.h
2026-12-04 7:26 [PATCH 0/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
` (2 preceding siblings ...)
2026-12-04 7:26 ` [PATCH 3/3] clocksource: Drop the inclusion of asm/clocksource.h Thomas Weißschuh
@ 2026-12-04 7:36 ` sashiko-bot
3 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-12-04 7:36 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger
Sashiko has finished reviewing this 3-patch series:
- Patches 1 and 2: no issues found.
- Patch 3 ("clocksource: Drop the inclusion of asm/clocksource.h"): 1
potential issue (1 High)
A detailed review has been sent as a separate reply to patch 3.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-vdso-asm-clocksource-v1-0-6fae836f286b@linutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread