alistair23-linux/drivers/clocksource
Linus Torvalds e279160f49 The timekeeping and timers departement provides:
- Time namespace support:
 
     If a container migrates from one host to another then it expects that
     clocks based on MONOTONIC and BOOTTIME are not subject to
     disruption. Due to different boot time and non-suspended runtime these
     clocks can differ significantly on two hosts, in the worst case time
     goes backwards which is a violation of the POSIX requirements.
 
     The time namespace addresses this problem. It allows to set offsets for
     clock MONOTONIC and BOOTTIME once after creation and before tasks are
     associated with the namespace. These offsets are taken into account by
     timers and timekeeping including the VDSO.
 
     Offsets for wall clock based clocks (REALTIME/TAI) are not provided by
     this mechanism. While in theory possible, the overhead and code
     complexity would be immense and not justified by the esoteric potential
     use cases which were discussed at Plumbers '18.
 
     The overhead for tasks in the root namespace (host time offsets = 0) is
     in the noise and great effort was made to ensure that especially in the
     VDSO. If time namespace is disabled in the kernel configuration the
     code is compiled out.
 
     Kudos to Andrei Vagin and Dmitry Sofanov who implemented this feature
     and kept on for more than a year addressing review comments, finding
     better solutions. A pleasant experience.
 
   - Overhaul of the alarmtimer device dependency handling to ensure that
     the init/suspend/resume ordering is correct.
 
   - A new clocksource/event driver for Microchip PIT64
 
   - Suspend/resume support for the Hyper-V clocksource
 
   - The usual pile of fixes, updates and improvements mostly in the
     driver code.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl4vbTcTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoXT2D/96iJ3G9Snn2khEQP3XS2rYmtDGw7NO
 m1n96falwWeGe6zreU80R2Jge5nLxQtNhRoMPLLee1GpHwRC6lvqEqgdZ4LMBrD2
 JqV7Gzg8Urmdh+hpDsyTCpeEWEzoMKxiFOX8PxwctqUhM4szEe5iQg2YQsg85Jw2
 vG6M93N2xwDILh4rhEMbKjo+5ZmYn7c1RQvpGOSmpKOj940W/N7H2HBsFhdaJ1Kw
 FW5pFv1211PaU5RV2YNb2dMeeMTT1N3e2VN4Dkadoxp47pb+725gNHEBEjmV9poG
 Lp4IhzGAPnj8zVD88icQZSTaK3gUHMClxprJ0Pf84WEtiH7SeGu8BPYyu77+oNDe
 yzcctDJNyCWXkzmaP/fe/HLc0TStbvNAJ5Tagp4BC75gzebeb4/n8RtRT0fKeDYL
 pxpDPKDAPU7p1JSjxiWAtshqjBycWNY3Z49bA7/VhKBhnv8BDyBPGlYd7/4xrbGr
 RK7DQNXJwaJaiNJ7p5PiaFxGzNyB0B9sThD/slSlEInIKb4h9YzWr0TV+NB62VnB
 sDcN+tpLbRPz5/5cHGGfxR0+zKWpfyai8pzbmmaXEaKssjRYwyvcac5EZdgbWpbK
 k7CqAjoWLA2P+tGeePNJOf5JYK6Vmdyh4clmuwM0zOiRJ9NlWUyMf3z7QYILs4RO
 UAI+6opYlZEPAw==
 =x3qT
 -----END PGP SIGNATURE-----

Merge tag 'timers-core-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "The timekeeping and timers departement provides:

   - Time namespace support:

     If a container migrates from one host to another then it expects
     that clocks based on MONOTONIC and BOOTTIME are not subject to
     disruption. Due to different boot time and non-suspended runtime
     these clocks can differ significantly on two hosts, in the worst
     case time goes backwards which is a violation of the POSIX
     requirements.

     The time namespace addresses this problem. It allows to set offsets
     for clock MONOTONIC and BOOTTIME once after creation and before
     tasks are associated with the namespace. These offsets are taken
     into account by timers and timekeeping including the VDSO.

     Offsets for wall clock based clocks (REALTIME/TAI) are not provided
     by this mechanism. While in theory possible, the overhead and code
     complexity would be immense and not justified by the esoteric
     potential use cases which were discussed at Plumbers '18.

     The overhead for tasks in the root namespace (ie where host time
     offsets = 0) is in the noise and great effort was made to ensure
     that especially in the VDSO. If time namespace is disabled in the
     kernel configuration the code is compiled out.

     Kudos to Andrei Vagin and Dmitry Sofanov who implemented this
     feature and kept on for more than a year addressing review
     comments, finding better solutions. A pleasant experience.

   - Overhaul of the alarmtimer device dependency handling to ensure
     that the init/suspend/resume ordering is correct.

   - A new clocksource/event driver for Microchip PIT64

   - Suspend/resume support for the Hyper-V clocksource

   - The usual pile of fixes, updates and improvements mostly in the
     driver code"

* tag 'timers-core-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
  alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n
  alarmtimer: Use wakeup source from alarmtimer platform device
  alarmtimer: Make alarmtimer platform device child of RTC device
  alarmtimer: Update alarmtimer_get_rtcdev() docs to reflect reality
  hrtimer: Add missing sparse annotation for __run_timer()
  lib/vdso: Only read hrtimer_res when needed in __cvdso_clock_getres()
  MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
  clocksource/drivers/hyper-v: Set TSC clocksource as default w/ InvariantTSC
  clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources
  clocksource/drivers/timer-microchip-pit64b: Fix sparse warning
  clocksource/drivers/exynos_mct: Rename Exynos to lowercase
  clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access
  clocksource/drivers/timer-ti-dm: Switch to platform_get_irq
  clocksource/drivers/timer-ti-dm: Convert to devm_platform_ioremap_resource
  clocksource/drivers/em_sti: Fix variable declaration in em_sti_probe
  clocksource/drivers/em_sti: Convert to devm_platform_ioremap_resource
  clocksource/drivers/bcm2835_timer: Fix memory leak of timer
  clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
  clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support
  clocksource/drivers/hyper-v: Reserve PAGE_SIZE space for tsc page
  ...
2020-01-27 16:47:05 -08:00
..
acpi_pm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 243 2019-06-19 17:09:07 +02:00
arc_timer.c Merge branch 'timers/vdso' into timers/core 2019-07-03 10:50:21 +02:00
arm_arch_timer.c Merge branch 'timers/vdso' into timers/core 2019-07-03 10:50:21 +02:00
arm_global_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
armv7m_systick.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
asm9260_timer.c clocksource/drivers/asm9260: Add a check for of_clk_get 2019-11-04 10:40:10 +01:00
bcm2835_timer.c clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-01-16 19:06:57 +01:00
bcm_kona_timer.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
clksrc-dbx500-prcmu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 197 2019-05-30 11:29:22 -07:00
clksrc_st_lpc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clps711x-timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dummy_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dw_apb_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dw_apb_timer_of.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
em_sti.c clocksource/drivers/em_sti: Fix variable declaration in em_sti_probe 2020-01-16 19:06:57 +01:00
exynos_mct.c clocksource/drivers/exynos_mct: Rename Exynos to lowercase 2020-01-16 19:09:02 +01:00
h8300_timer8.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
h8300_timer16.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
h8300_tpu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hyperv_timer.c clocksource/drivers/hyper-v: Set TSC clocksource as default w/ InvariantTSC 2020-01-16 19:09:02 +01:00
i8253.c clockevents/drivers/i8253: Add support for PIT shutdown quirk 2018-11-04 11:04:46 +01:00
ingenic-timer.c clocksource: Add a new timer-ingenic driver 2019-08-08 15:30:08 -07:00
jcore-pit.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
Kconfig clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support 2020-01-16 19:06:57 +01:00
Makefile clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support 2020-01-16 19:06:57 +01:00
mips-gic-timer.c clocksource/drivers/mips-gic-timer: Make gic_compare_irqaction static 2019-03-22 22:59:33 +01:00
mmio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mps2-timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mxs_timer.c clocksource/drivers/mxs_timer: Switch to SPDX identifier 2018-05-23 07:39:09 +02:00
nomadik-mtu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
numachip.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
renesas-ostm.c clocksource/drivers/renesas-ostm: Use unique device name instead of ostm 2019-11-04 10:38:46 +01:00
samsung_pwm_timer.c clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning 2019-10-18 15:00:20 +02:00
scx200_hrt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sh_cmt.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sh_mtu2.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
sh_tmu.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
timer-armada-370-xp.c clocksource/drivers: Unify the names to timer-* format 2018-10-03 14:37:02 +02:00
timer-atcpit100.c clocksource/drivers: Set clockevent device cpumask to cpu_possible_mask 2018-07-26 11:26:30 +02:00
timer-atlas7.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
timer-atmel-pit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
timer-atmel-st.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer-atmel-tcb.c clocksource/drivers/tcb_clksrc: Register delay timer 2019-08-27 00:31:39 +02:00
timer-cadence-ttc.c clocksource/drivers/cadence-ttc: Use ttc driver as platform driver 2020-01-16 19:06:57 +01:00
timer-cs5535.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206 2019-05-30 11:29:53 -07:00
timer-davinci.c clocksource/drivers/davinci: Add support for clocksource 2019-06-25 20:46:14 +02:00
timer-digicolor.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
timer-efm32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
timer-fsl-ftm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timer-fttmr010.c clocksource/drivers/fttmr010: Fix invalid interrupt register access 2018-12-18 22:22:23 +01:00
timer-gx6605s.c clocksource/drivers/c-sky: Add gx6605s SOC system timer 2018-11-02 19:41:12 +01:00
timer-imx-gpt.c clocksource/drivers/imx-gpt: Remove unnecessary irq protection 2018-12-18 22:22:23 +01:00
timer-imx-sysctr.c clocksource/drivers/imx-sysctr: Add internal clock divider handle 2019-08-27 00:31:39 +02:00
timer-imx-tpm.c clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of 2018-12-18 22:22:23 +01:00
timer-integrator-ap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer-ixp4xx.c clocksource/drivers/ixp4xx: Implement delay timer 2019-06-25 19:49:18 +02:00
timer-keystone.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
timer-lpc32xx.c clocksource/drivers: Unify the names to timer-* format 2018-10-03 14:37:02 +02:00
timer-mediatek.c clocksource/drivers/mediatek: Fix error handling 2019-10-16 17:04:50 +02:00
timer-meson6.c clocksource/drivers/timer-meson6: Update with SPDX Licence identifier 2019-06-25 19:49:18 +02:00
timer-microchip-pit64b.c clocksource/drivers/timer-microchip-pit64b: Fix sparse warning 2020-01-16 19:09:02 +01:00
timer-milbeaut.c clocksource/drivers/timer-milbeaut: Cleanup common register accesses 2019-05-02 21:55:58 +02:00
timer-mp-csky.c clocksource/drivers/c-sky: fixup ftrace call-graph panic 2018-12-31 23:17:23 +08:00
timer-npcm7xx.c clocksource/drivers/npcm: Fix GENMASK and timer operation 2019-08-27 00:31:39 +02:00
timer-nps.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
timer-of.c - Some cleanups for the timer-of, use %p0F and the unique device name 2019-11-04 18:49:13 +01:00
timer-of.h clocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of' 2018-01-08 17:57:24 +01:00
timer-orion.c clocksource/drivers: Unify the names to timer-* format 2018-10-03 14:37:02 +02:00
timer-owl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timer-oxnas-rps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
timer-pistachio.c clocksource/drivers: Unify the names to timer-* format 2018-10-03 14:37:02 +02:00
timer-prima2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
timer-probe.c clocksource/drivers: Do not warn on probe defer 2019-08-27 00:31:39 +02:00
timer-pxa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
timer-qcom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
timer-rda.c clocksource/drivers/rda: Add clock driver for RDA8810PL SoC 2018-12-18 22:22:23 +01:00
timer-riscv.c clocksource: riscv: add notrace to riscv_sched_clock 2020-01-04 21:48:48 -08:00
timer-rockchip.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
timer-sp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
timer-sp804.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer-sprd.c clocksource/drivers/sprd: Register one always-on timer to compensate suspend time 2018-07-26 11:26:34 +02:00
timer-stm32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
timer-sun4i.c clocksource: sun4i: Add missing compatibles 2019-08-27 00:31:39 +02:00
timer-sun5i.c clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable 2019-02-23 12:13:45 +01:00
timer-tango-xtal.c clocksource/drivers/tango-xtal: Rename the file for consistency 2019-02-23 12:13:45 +01:00
timer-tegra.c clocksource/drivers/tegra: Set up maximum-ticks limit properly 2019-06-25 19:49:18 +02:00
timer-ti-32k.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 341 2019-06-05 17:37:07 +02:00
timer-ti-dm.c clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access 2020-01-16 19:09:02 +01:00
timer-u300.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
timer-versatile.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
timer-vf-pit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timer-vt8500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer-zevio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00