arch/powerpc/kernel/time.c:801:5: error: no previous prototype for 'update_persistent_clock64'
kernel test robot
build bottree: https://github.com/0day-ci/linux/commits/UPDATE-20210801-003033/Carlos-Bilbao/include-linux-Reorganize-timekeeping-and-ktime-headers/20210722-233301 head: fb6876d6185db9db41efb455500de67da0937a36 commit: fb6876d6185db9db41efb455500de67da0937a36 include: linux: Reorganize timekeeping and ktime headers date: 3 hours ago config: powerpc-bluestone_defconfig (attached as .config) compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fb6876d6185db9db41efb455500de67da0937a36
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20210801-003033/Carlos-Bilbao/include-linux-Reorganize-timekeeping-and-ktime-headers/20210722-233301 git checkout fb6876d6185db9db41efb455500de67da0937a36
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> arch/powerpc/kernel/time.c:801:5: error: no previous prototype for 'update_persistent_clock64' [-Werror=missing-prototypes]
801 | int update_persistent_clock64(struct timespec64 now)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kernel/time.c:840:6: error: no previous prototype for 'read_persistent_clock64' [-Werror=missing-prototypes] 840 | void read_persistent_clock64(struct timespec64 *ts)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/update_persistent_clock64 +801 arch/powerpc/kernel/time.c
10f7e7c15e6ce4 arch/ppc64/kernel/time.c Arnd Bergmann 2005-06-23 800
5235afa89a246c arch/powerpc/kernel/time.c Arnd Bergmann 2018-04-23 @801 int update_persistent_clock64(struct timespec64 now)
^1da177e4c3f41 arch/ppc64/kernel/time.c Linus Torvalds 2005-04-16 802 {
f2783c15007468 arch/powerpc/kernel/time.c Paul Mackerras 2005-10-20 803 struct rtc_time tm;
f2783c15007468 arch/powerpc/kernel/time.c Paul Mackerras 2005-10-20 804
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 805 if (!ppc_md.set_rtc_time)
023f333a99cee9 arch/powerpc/kernel/time.c Jason Gunthorpe 2012-12-17 806 return -ENODEV;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 807
5235afa89a246c arch/powerpc/kernel/time.c Arnd Bergmann 2018-04-23 808 rtc_time64_to_tm(now.tv_sec + 1 + timezone_offset, &tm);
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 809
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 810 return ppc_md.set_rtc_time(&tm);
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 811 }
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 812
5bfd643583b2e2 arch/powerpc/kernel/time.c Arnd Bergmann 2018-04-23 813 static void __read_persistent_clock(struct timespec64 *ts)
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 814 {
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 815 struct rtc_time tm;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 816 static int first = 1;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 817
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 818 ts->tv_nsec = 0;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 819 /* XXX this is a litle fragile but will work okay in the short term */
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 820 if (first) {
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 821 first = 0;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 822 if (ppc_md.time_init)
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 823 timezone_offset = ppc_md.time_init();
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 824
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 825 /* get_boot_time() isn't guaranteed to be safe to call late */
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 826 if (ppc_md.get_boot_time) {
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 827 ts->tv_sec = ppc_md.get_boot_time() - timezone_offset;
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 828 return;
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 829 }
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 830 }
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 831 if (!ppc_md.get_rtc_time) {
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 832 ts->tv_sec = 0;
d90246cd8e0141 arch/powerpc/kernel/time.c Martin Schwidefsky 2009-08-22 833 return;
aa3be5f32db137 arch/powerpc/kernel/time.c Tony Breeds 2007-09-21 834 }
f2783c15007468 arch/powerpc/kernel/time.c Paul Mackerras 2005-10-20 835 ppc_md.get_rtc_time(&tm);
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 836
5bfd643583b2e2 arch/powerpc/kernel/time.c Arnd Bergmann 2018-04-23 837 ts->tv_sec = rtc_tm_to_time64(&tm);
f2783c15007468 arch/powerpc/kernel/time.c Paul Mackerras 2005-10-20 838 }
f2783c15007468 arch/powerpc/kernel/time.c Paul Mackerras 2005-10-20 839
5bfd643583b2e2 arch/powerpc/kernel/time.c Arnd Bergmann 2018-04-23 @840 void read_persistent_clock64(struct timespec64 *ts)
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 841 {
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 842 __read_persistent_clock(ts);
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 843
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 844 /* Sanitize it in case real time clock is set below EPOCH */
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 845 if (ts->tv_sec < 0) {
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 846 ts->tv_sec = 0;
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 847 ts->tv_nsec = 0;
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 848 }
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 849
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 850 }
978d7eb31d44de arch/powerpc/kernel/time.c Benjamin Herrenschmidt 2009-11-01 851 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
PATCH 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: 4.0 Fix kernel test robot warnings for ia64 and x86.
4.1 Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Signature · 1 line
2.25.1
Re: [PATCH v4.1] include: linux: Reorganize timekeeping and ktime headers
Quoted 8 lines · Carlos Bilbao
Reorganize and separate the headers by making
ktime.htake care of thektime_get()family of functions, and reservetimekeeping.hfor the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, sincetimekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Include the headertimekeeping.hwherever it is necessary for a successful compilation after the header code reorganization.
Quoted 8 lines
Signed-off-by Carlos Bilbao <[email protected]>Reported-by kernel test robot <[email protected]>arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 +
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: 4.0 Fix kernel test robot warnings for ia64 and x86.
4.1 Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Signature · 1 line
2.25.1
PATCH 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: 4.0 Fix kernel test robot warnings for ia64 and x86.
4.1 Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Signature · 1 line
2.25.1
Re: [PATCH v4.1] include: linux: Reorganize timekeeping and ktime headers
Quoted 2 lines · Carlos Bilbao
- v4: 4.0 Fix kernel test robot warnings for ia64 and x86. 4.1 Fix kernel test robot warnings for m68k and powerpc.
Please just use whole numbers for patch versions, there's no need for .X for this type of thing as our tools do not know how to catch that, and it makes no sense.
Just keep bumping the number please.
greg k-h
PATCH v5 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: Fix kernel test robot warnings for ia64 and x86.
- v5: Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Signature · 1 line
2.25.1
PATCH v5 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: Fix kernel test robot warnings for ia64 and x86.
- v5: Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Signature · 1 line
2.25.1
Re: [PATCH v5] include: linux: Reorganize timekeeping and ktime headers
Hello everyone,
Some time ago I sent a small patch to avoid implicit function declaration. In particular, timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Some maintainers saw this as an opportunity to reorganize ktime, and so I did and tested for all architectures. Now, this patch has fallen into the "limbo of patches", so the original problem remains unsolved. Please, either take a look at this or check the original patch for the header dependencies.
Thanks!!
Carlos.
Quoted 719 lines · Carlos Bilbao
Reorganize and separate the headers by making
ktime.htake care of thektime_get()family of functions, and reservetimekeeping.hfor the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, sincetimekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Include the headertimekeeping.hwherever it is necessary for a successful compilation after the header code reorganization.Signed-off-by Carlos Bilbao <[email protected]>Reported-by kernel test robot <[email protected]>---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h,posix-timers.candhda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, updatearch/arm64/kvm/hypercalls.c,include/linux/stmmac.h, anddrivers/rtc/class.c. No otherarch/seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: Fix kernel test robot warnings for ia64 and x86.
- v5: Fix kernel test robot warnings for m68k and powerpc.--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)arch/arm64/kvm/hypercalls.c +1
-0@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h> arch/ia64/kernel/time.c +1
-0@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h> arch/m68k/atari/time.c +1
-0@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h> arch/m68k/hp300/time.c +2
-0@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h> arch/m68k/mac/via.c +1
-0@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h> arch/m68k/mvme16x/config.c +1
-0@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h> arch/m68k/sun3/sun3ints.c +1
-0@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h> arch/powerpc/kernel/time.c +1
-0@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h> arch/x86/kernel/rtc.c +1
-0@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h> arch/x86/kernel/tsc.c +1
-0@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h> drivers/rtc/class.c +1
-0@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h" include/linux/ktime.h +194
-2@@ -229,6 +229,198 @@ static inline ktime_t ms_to_ktime(u64 ms) return ms * NSEC_PER_MSEC; } -# include <linux/timekeeping.h> +/* +* ktime_get() family: read the current time in a multitude of ways, +* +* The default time reference is CLOCK_MONOTONIC, starting at +* boot time but not counting the time spent in suspend. +* For other references, use the functions with "real", "clocktai", +* "boottime" and "raw" suffixes. +* +* To get the time in a different format, use the ones wit +* "ns", "ts64" and "seconds" suffix. +* +* See Documentation/core-api/timekeeping.rst for more details. +*/ -#endif + +/* +* timespec64 based interfaces +*/ +extern void ktime_get_raw_ts64 (struct timespec64 *ts); +extern void ktime_get_ts64 (struct timespec64 *ts); +extern void ktime_get_real_ts64 (struct timespec64 *tv); +extern void ktime_get_coarse_ts64 (struct timespec64 *ts); +extern void ktime_get_coarse_real_ts64 (struct timespec64 *ts); + +void getboottime64 (struct timespec64 *ts); + +/* +* time64_t base interfaces +*/ +extern time64_t ktime_get_seconds (void ); +extern time64_t __ktime_get_real_seconds (void ); +extern time64_t ktime_get_real_seconds (void ); + +/* +* ktime_t based interfaces +*/ + +enum tk_offsets { +TK_OFFS_REAL , +TK_OFFS_BOOT , +TK_OFFS_TAI , +TK_OFFS_MAX , +}; + +extern ktime_t ktime_get (void ); +extern ktime_t ktime_get_with_offset (enum tk_offsets offs); +extern ktime_t ktime_get_coarse_with_offset (enum tk_offsets offs); +extern ktime_t ktime_mono_to_any (ktime_t tmono,enum tk_offsets offs); +extern ktime_t ktime_get_raw (void ); +extern u32 ktime_get_resolution_ns (void ); + +/** +* ktime_get_real - get the real (wall-) time in ktime_t format +*/ +static inline ktime_t ktime_get_real (void ) +{ +return ktime_get_with_offset (TK_OFFS_REAL ); +} + +static inline ktime_t ktime_get_coarse_real (void ) +{ +return ktime_get_coarse_with_offset (TK_OFFS_REAL ); +} + +/** +* ktime_get_boottime - Returns monotonic time since boot in ktime_t format +* +* This is similar to CLOCK_MONTONIC/ktime_get, but also includes the +* time spent in suspend. +*/ +static inline ktime_t ktime_get_boottime (void ) +{ +return ktime_get_with_offset (TK_OFFS_BOOT ); +} + +static inline ktime_t ktime_get_coarse_boottime (void ) +{ +return ktime_get_coarse_with_offset (TK_OFFS_BOOT ); +} + +/** +* ktime_get_clocktai - Returns the TAI time of day in ktime_t format +*/ +static inline ktime_t ktime_get_clocktai (void ) +{ +return ktime_get_with_offset (TK_OFFS_TAI ); +} + +static inline ktime_t ktime_get_coarse_clocktai (void ) +{ +return ktime_get_coarse_with_offset (TK_OFFS_TAI ); +} + +static inline ktime_t ktime_get_coarse (void ) +{ +struct timespec64 ts; + +ktime_get_coarse_ts64 (&ts); +return timespec64_to_ktime (ts); +} + +static inline u64 ktime_get_coarse_ns (void ) +{ +return ktime_to_ns (ktime_get_coarse ()); +} + +static inline u64 ktime_get_coarse_real_ns (void ) +{ +return ktime_to_ns (ktime_get_coarse_real ()); +} + +static inline u64 ktime_get_coarse_boottime_ns (void ) +{ +return ktime_to_ns (ktime_get_coarse_boottime ()); +} + +static inline u64 ktime_get_coarse_clocktai_ns (void ) +{ +return ktime_to_ns (ktime_get_coarse_clocktai ()); +} + +/** +* ktime_mono_to_real - Convert monotonic time to clock realtime +*/ +static inline ktime_t ktime_mono_to_real (ktime_t mono) +{ +return ktime_mono_to_any (mono,TK_OFFS_REAL ); +} + +static inline u64 ktime_get_ns (void ) +{ +return ktime_to_ns (ktime_get ()); +} + +static inline u64 ktime_get_real_ns (void ) +{ +return ktime_to_ns (ktime_get_real ()); +} + +static inline u64 ktime_get_boottime_ns (void ) +{ +return ktime_to_ns (ktime_get_boottime ()); +} + +static inline u64 ktime_get_clocktai_ns (void ) +{ +return ktime_to_ns (ktime_get_clocktai ()); +} + +static inline u64 ktime_get_raw_ns (void ) +{ +return ktime_to_ns (ktime_get_raw ()); +} + +extern u64 ktime_get_mono_fast_ns (void ); +extern u64 ktime_get_raw_fast_ns (void ); +extern u64 ktime_get_boot_fast_ns (void ); +extern u64 ktime_get_real_fast_ns (void ); + +/* +* timespec64/time64_t interfaces utilizing the ktime based ones +* for API completeness, these could be implemented more efficiently +* if needed. +*/ +static inline void ktime_get_boottime_ts64 (struct timespec64 *ts) +{ + *ts =ktime_to_timespec64 (ktime_get_boottime ()); +} + +static inline void ktime_get_coarse_boottime_ts64 (struct timespec64 *ts) +{ + *ts =ktime_to_timespec64 (ktime_get_coarse_boottime ()); +} + +static inline time64_t ktime_get_boottime_seconds (void ) +{ +return ktime_divns (ktime_get_coarse_boottime (),NSEC_PER_SEC ); +} + +static inline void ktime_get_clocktai_ts64 (struct timespec64 *ts) +{ + *ts =ktime_to_timespec64 (ktime_get_clocktai ()); +} + +static inline void ktime_get_coarse_clocktai_ts64 (struct timespec64 *ts) +{ + *ts =ktime_to_timespec64 (ktime_get_coarse_clocktai ()); +} + +static inline time64_t ktime_get_clocktai_seconds (void ) +{ +return ktime_divns (ktime_get_coarse_clocktai (),NSEC_PER_SEC ); +} + +#endif /* _LINUX_KTIME_H */ include/linux/pps_kernel.h +1
-0@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines include/linux/sched_clock.h +2
-0@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock() include/linux/stmmac.h +1
-0@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8include/linux/timekeeping.h +1
-196@@ -19,201 +19,6 @@ extern void legacy_timer_tick(unsigned long ticks);extern int do_settimeofday64 (const struct timespec64 *ts);extern int do_sys_settimeofday64 (const struct timespec64 *tv,const struct timezone *tz); - -/* -* ktime_get() family: read the current time in a multitude of ways, -* -* The default time reference is CLOCK_MONOTONIC, starting at -* boot time but not counting the time spent in suspend. -* For other references, use the functions with "real", "clocktai", -* "boottime" and "raw" suffixes. -* -* To get the time in a different format, use the ones wit -* "ns", "ts64" and "seconds" suffix. -* -* See Documentation/core-api/timekeeping.rst for more details. -*/ - - -/* -* timespec64 based interfaces -*/ -extern void ktime_get_raw_ts64 (struct timespec64 *ts); -extern void ktime_get_ts64 (struct timespec64 *ts); -extern void ktime_get_real_ts64 (struct timespec64 *tv); -extern void ktime_get_coarse_ts64 (struct timespec64 *ts); -extern void ktime_get_coarse_real_ts64 (struct timespec64 *ts); - -void getboottime64 (struct timespec64 *ts); - -/* -* time64_t base interfaces -*/ -extern time64_t ktime_get_seconds (void ); -extern time64_t __ktime_get_real_seconds (void ); -extern time64_t ktime_get_real_seconds (void ); - -/* -* ktime_t based interfaces -*/ - -enum tk_offsets { -TK_OFFS_REAL , -TK_OFFS_BOOT , -TK_OFFS_TAI , -TK_OFFS_MAX , -}; - -extern ktime_t ktime_get (void ); -extern ktime_t ktime_get_with_offset (enum tk_offsets offs); -extern ktime_t ktime_get_coarse_with_offset (enum tk_offsets offs); -extern ktime_t ktime_mono_to_any (ktime_t tmono,enum tk_offsets offs); -extern ktime_t ktime_get_raw (void ); -extern u32 ktime_get_resolution_ns (void ); - -/** -* ktime_get_real - get the real (wall-) time in ktime_t format -*/ -static inline ktime_t ktime_get_real (void ) -{ -return ktime_get_with_offset (TK_OFFS_REAL ); -} - -static inline ktime_t ktime_get_coarse_real (void ) -{ -return ktime_get_coarse_with_offset (TK_OFFS_REAL ); -} - -/** -* ktime_get_boottime - Returns monotonic time since boot in ktime_t format -* -* This is similar to CLOCK_MONTONIC/ktime_get, but also includes the -* time spent in suspend. -*/ -static inline ktime_t ktime_get_boottime (void ) -{ -return ktime_get_with_offset (TK_OFFS_BOOT ); -} - -static inline ktime_t ktime_get_coarse_boottime (void ) -{ -return ktime_get_coarse_with_offset (TK_OFFS_BOOT ); -} - -/** -* ktime_get_clocktai - Returns the TAI time of day in ktime_t format -*/ -static inline ktime_t ktime_get_clocktai (void ) -{ -return ktime_get_with_offset (TK_OFFS_TAI ); -} - -static inline ktime_t ktime_get_coarse_clocktai (void ) -{ -return ktime_get_coarse_with_offset (TK_OFFS_TAI ); -} - -static inline ktime_t ktime_get_coarse (void ) -{ -struct timespec64 ts; - -ktime_get_coarse_ts64 (&ts); -return timespec64_to_ktime (ts); -} - -static inline u64 ktime_get_coarse_ns (void ) -{ -return ktime_to_ns (ktime_get_coarse ()); -} - -static inline u64 ktime_get_coarse_real_ns (void ) -{ -return ktime_to_ns (ktime_get_coarse_real ()); -} - -static inline u64 ktime_get_coarse_boottime_ns (void ) -{ -return ktime_to_ns (ktime_get_coarse_boottime ()); -} - -static inline u64 ktime_get_coarse_clocktai_ns (void ) -{ -return ktime_to_ns (ktime_get_coarse_clocktai ()); -} - -/** -* ktime_mono_to_real - Convert monotonic time to clock realtime -*/ -static inline ktime_t ktime_mono_to_real (ktime_t mono) -{ -return ktime_mono_to_any (mono,TK_OFFS_REAL ); -} - -static inline u64 ktime_get_ns (void ) -{ -return ktime_to_ns (ktime_get ()); -} - -static inline u64 ktime_get_real_ns (void ) -{ -return ktime_to_ns (ktime_get_real ()); -} - -static inline u64 ktime_get_boottime_ns (void ) -{ -return ktime_to_ns (ktime_get_boottime ()); -} - -static inline u64 ktime_get_clocktai_ns (void ) -{ -return ktime_to_ns (ktime_get_clocktai ()); -} - -static inline u64 ktime_get_raw_ns (void ) -{ -return ktime_to_ns (ktime_get_raw ()); -} - -extern u64 ktime_get_mono_fast_ns (void ); -extern u64 ktime_get_raw_fast_ns (void ); -extern u64 ktime_get_boot_fast_ns (void ); -extern u64 ktime_get_real_fast_ns (void ); - -/* -* timespec64/time64_t interfaces utilizing the ktime based ones -* for API completeness, these could be implemented more efficiently -* if needed. -*/ -static inline void ktime_get_boottime_ts64 (struct timespec64 *ts) -{ - *ts =ktime_to_timespec64 (ktime_get_boottime ()); -} - -static inline void ktime_get_coarse_boottime_ts64 (struct timespec64 *ts) -{ - *ts =ktime_to_timespec64 (ktime_get_coarse_boottime ()); -} - -static inline time64_t ktime_get_boottime_seconds (void ) -{ -return ktime_divns (ktime_get_coarse_boottime (),NSEC_PER_SEC ); -} - -static inline void ktime_get_clocktai_ts64 (struct timespec64 *ts) -{ - *ts =ktime_to_timespec64 (ktime_get_clocktai ()); -} - -static inline void ktime_get_coarse_clocktai_ts64 (struct timespec64 *ts) -{ - *ts =ktime_to_timespec64 (ktime_get_coarse_clocktai ()); -} - -static inline time64_t ktime_get_clocktai_seconds (void ) -{ -return ktime_divns (ktime_get_coarse_clocktai (),NSEC_PER_SEC ); -} -/* * RTC specific */ @@ -308,4 +113,4 @@ void read_persistent_wall_and_boot_offset(struct timespec64 *wall_clock,extern int update_persistent_clock64 (struct timespec64 now);#endif -#endif +#endif /* _LINUX_TIMEKEEPING_H */ init/main.c +1
-0@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h> kernel/time/ntp.c +1
-0@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h" kernel/time/posix-timers.c +1
-0@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h> kernel/time/tick-legacy.c +1
-0@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h" kernel/time/time.c +1
-0@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h> kernel/time/timekeeping.c +1
-0@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h" sound/pci/hda/hda_controller.c +1
-0@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Re: [PATCH v5] include: linux: Reorganize timekeeping and ktime headers
Quoted 9 lines · Carlos Bilbao
Hello everyone,
Some time ago I sent a small patch to avoid implicit function declaration. In particular,
timekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Some maintainers saw this as an opportunity to reorganize ktime, and so I did and tested for all architectures. Now, this patch has fallen into the "limbo of patches", so the original problem remains unsolved. Please, either take a look at this or check the original patch for the header dependencies.
Please just resend after 5.16-rc1 is out, there's nothing we can do with this at this point in time.
thanks,
greg k-h
Re: [PATCH v5] include: linux: Reorganize timekeeping and ktime headers
Hello again,
Quoted 11 lines · Greg KH
Quoted 9 lines · Carlos Bilbao
Hello everyone,
Some time ago I sent a small patch to avoid implicit function declaration. In particular,
timekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Some maintainers saw this as an opportunity to reorganize ktime, and so I did and tested for all architectures. Now, this patch has fallen into the "limbo of patches", so the original problem remains unsolved. Please, either take a look at this or check the original patch for the header dependencies.
Quoted 7 lines
Please just resend after 5.16-rc1 is out, there's nothing we can do with this at this point in time.
thanks,
greg k-h
I think that now it is a good time to send :)
Thanks!
Carlos.
PATCH v5 1/1 include: linux: Reorganize timekeeping and ktime headers
Reorganize and separate the headers by making ktime.h take care of the ktime_get() family of functions, and reserve timekeeping.h for the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, since timekeeping.h was using ktime_to_ns(), a static function defined in a header it does no include, ktime.h. Include the header timekeeping.h wherever it is necessary for a successful compilation after the header code reorganization.
---
Changelog:
- v2: Add three more files that also needed a header update for x86:
pps_kernel.h, posix-timers.c and hda_controller.c
- v3: Cover build tests for other architectures than x86. To compile arm64, update arch/arm64/kvm/hypercalls.c, include/linux/stmmac.h, and drivers/rtc/class.c. No other arch/ seems to need fixes but to be on the safe side compiled arm, mips, powerpc, sparc, s390, riscv and i386.
- v4: Fix kernel test robot warnings for ia64 and x86.
- v5: Fix kernel test robot warnings for m68k and powerpc.
--- arch/arm64/kvm/hypercalls.c | 1 + arch/ia64/kernel/time.c | 1 + arch/m68k/atari/time.c | 1 + arch/m68k/hp300/time.c | 2 + arch/m68k/mac/via.c | 1 + arch/m68k/mvme16x/config.c | 1 + arch/m68k/sun3/sun3ints.c | 1 + arch/powerpc/kernel/time.c | 1 + arch/x86/kernel/rtc.c | 1 + arch/x86/kernel/tsc.c | 1 + drivers/rtc/class.c | 1 + include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++- include/linux/pps_kernel.h | 1 + include/linux/sched_clock.h | 2 + include/linux/stmmac.h | 1 + include/linux/timekeeping.h | 197 +-------------------------------- init/main.c | 1 + kernel/time/ntp.c | 1 + kernel/time/posix-timers.c | 1 + kernel/time/tick-legacy.c | 1 + kernel/time/time.c | 1 + kernel/time/timekeeping.c | 1 + sound/pci/hda/hda_controller.c | 1 + 23 files changed, 218 insertions(+), 198 deletions(-)
arch/arm64/kvm/hypercalls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/arm-smccc.h> #include <linux/kvm_host.h> +#include <linux/timekeeping.h> #include <asm/kvm_emulate.h>
arch/ia64/kernel/time.c +1 -0
@@ -22,6 +22,7 @@#include <linux/efi.h> #include <linux/timex.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/platform_device.h> #include <linux/sched/cputime.h>
arch/m68k/atari/time.c +1 -0
@@ -19,6 +19,7 @@#include <linux/clocksource.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/timekeeping.h> #include <asm/atariints.h> #include <asm/machdep.h>
arch/m68k/hp300/time.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> +#include <asm/machdep.h> #include <asm/irq.h> #include <asm/io.h>
arch/m68k/mac/via.c +1 -0
@@ -31,6 +31,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/timekeeping.h> #include <asm/macintosh.h> #include <asm/macints.h>
arch/m68k/mvme16x/config.c +1 -0
@@ -28,6 +28,7 @@#include <linux/rtc.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/timekeeping.h> #include <asm/bootinfo.h> #include <asm/bootinfo-vme.h>
arch/m68k/sun3/sun3ints.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/kernel_stat.h> #include <linux/interrupt.h> +#include <linux/timekeeping.h> #include <asm/segment.h> #include <asm/intersil.h> #include <asm/oplib.h>
arch/powerpc/kernel/time.c +1 -0
@@ -55,6 +55,7 @@#include <linux/sched/cputime.h> #include <linux/sched/clock.h> #include <linux/processor.h> +#include <linux/timekeeping.h> #include <asm/trace.h> #include <asm/interrupt.h>
arch/x86/kernel/rtc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/pnp.h> #include <linux/of.h> +#include <linux/timekeeping.h> #include <asm/vsyscall.h> #include <asm/x86_init.h>
arch/x86/kernel/tsc.c +1 -0
@@ -15,6 +15,7 @@#include <linux/timex.h> #include <linux/static_key.h> #include <linux/static_call.h> +#include <linux/timekeeping.h> #include <asm/hpet.h> #include <asm/timer.h>
drivers/rtc/class.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kdev_t.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #include <linux/workqueue.h> #include "rtc-core.h"
include/linux/ktime.h +194 -2
200 lines not on this page · raw message
include/linux/pps_kernel.h +1 -0
@@ -12,6 +12,7 @@#include <linux/cdev.h> #include <linux/device.h> #include <linux/time.h> +#include <linux/timekeeping.h> /* * Global defines
include/linux/sched_clock.h +2 -0
@@ -5,6 +5,8 @@#ifndef LINUX_SCHED_CLOCK #define LINUX_SCHED_CLOCK +#include <linux/timekeeping.h> +#ifdef CONFIG_GENERIC_SCHED_CLOCK /** * struct clock_read_data - data required to read from sched_clock()
include/linux/stmmac.h +1 -0
@@ -14,6 +14,7 @@#include <linux/platform_device.h> #include <linux/phy.h> +#include <linux/timekeeping.h> #define MTL_MAX_RX_QUEUES 8#define MTL_MAX_TX_QUEUES 8
include/linux/timekeeping.h +1 -196
206 lines not on this page · raw message
init/main.c +1 -0
@@ -100,6 +100,7 @@#include <linux/kcsan.h> #include <linux/init_syscalls.h> #include <linux/stackdepot.h> +#include <linux/timekeeping.h> #include <asm/io.h> #include <asm/bugs.h>
kernel/time/ntp.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/rtc.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "ntp_internal.h" #include "timekeeping_internal.h"
kernel/time/posix-timers.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/time.h> +#include <linux/timekeeping.h> #include <linux/mutex.h> #include <linux/sched/task.h>
kernel/time/tick-legacy.c +1 -0
@@ -7,6 +7,7 @@#include <linux/irq.h> #include <linux/profile.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include "tick-internal.h"
kernel/time/time.c +1 -0
@@ -29,6 +29,7 @@#include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> +#include <linux/timekeeping.h> #include <linux/errno.h> #include <linux/syscalls.h> #include <linux/security.h>
kernel/time/timekeeping.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pvclock_gtod.h> #include <linux/compiler.h> #include <linux/audit.h> +#include <linux/timekeeping.h> #include "tick-internal.h" #include "ntp_internal.h"
sound/pci/hda/hda_controller.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> +#include <linux/timekeeping.h> #ifdef CONFIG_X86 /* for art-tsc conversion */
Re: [PATCH v5] include: linux: Reorganize timekeeping and ktime headers
Quoted 8 lines · Carlos Bilbao
Reorganize and separate the headers by making
ktime.htake care of thektime_get()family of functions, and reservetimekeeping.hfor the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, sincetimekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Include the headertimekeeping.hwherever it is necessary for a successful compilation after the header code reorganization.
Quoted 4 lines
Signed-off-by Carlos Bilbao <[email protected]>Reported-by kernel test robot <[email protected]>---
Someone, look at me! What a lonely and solitary patch I am...
Re: [PATCH v5] include: linux: Reorganize timekeeping and ktime headers
Quoted 9 lines · Carlos Bilbao
Quoted 8 lines · Carlos Bilbao
Reorganize and separate the headers by making
ktime.htake care of thektime_get()family of functions, and reservetimekeeping.hfor the actual timekeeping. This also helps to avoid implicit function errors and strengthens the header dependencies, sincetimekeeping.hwas usingktime_to_ns(), a static function defined in a header it does no include,ktime.h. Include the headertimekeeping.hwherever it is necessary for a successful compilation after the header code reorganization.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Carlos Bilbao <[email protected]>Reported-by kernel test robot <[email protected]>---
Someone, look at me! What a lonely and solitary patch I am...
Yes it is, maybe the time maintainers will pick it up eventually if they feel it is valid.
good luck!
greg k-h