Skip to content

Commit

Permalink
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "A rather large update for timers/timekeeping:

   - compat syscall consolidation (Al Viro)

   - Posix timer consolidation (Christoph Helwig / Thomas Gleixner)

   - Cleanup of the device tree based initialization for clockevents and
     clocksources (Daniel Lezcano)

   - Consolidation of the FTTMR010 clocksource/event driver (Linus
     Walleij)

   - The usual set of small fixes and updates all over the place"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (93 commits)
  timers: Make the cpu base lock raw
  clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()'
  clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap
  clocksource/drivers/tcb_clksrc: Make IO endian agnostic
  clocksource/drivers/sun4i: Switch to the timer-of common init
  clocksource/drivers/timer-of: Fix invalid iomap check
  Revert "ktime: Simplify ktime_compare implementation"
  clocksource/drivers: Fix uninitialized variable use in timer_of_init
  kselftests: timers: Add test for frequency step
  kselftests: timers: Fix inconsistency-check to not ignore first timestamp
  time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD
  time: Clean up CLOCK_MONOTONIC_RAW time handling
  posix-cpu-timers: Make timespec to nsec conversion safe
  itimer: Make timeval to nsec conversion range limited
  timers: Fix parameter description of try_to_del_timer_sync()
  ktime: Simplify ktime_compare implementation
  clocksource/drivers/fttmr010: Factor out clock read code
  clocksource/drivers/fttmr010: Implement delay timer
  clocksource/drivers: Add timer-of common init routine
  clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume
  ...
  • Loading branch information
torvalds committed Jul 3, 2017
2 parents e0f3e8f + 2287d86 commit 1b044f1
Show file tree
Hide file tree
Showing 175 changed files with 2,498 additions and 3,166 deletions.
6 changes: 5 additions & 1 deletion Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ Required properties:

- compatible : Must be one of
"faraday,fttmr010"
"cortina,gemini-timer"
"cortina,gemini-timer", "faraday,fttmr010"
"moxa,moxart-timer", "faraday,fttmr010"
"aspeed,ast2400-timer"
"aspeed,ast2500-timer"

- reg : Should contain registers location and length
- interrupts : Should contain the three timer interrupts usually with
flags for falling edge
Expand Down
19 changes: 0 additions & 19 deletions Documentation/devicetree/bindings/timer/moxa,moxart-timer.txt

This file was deleted.

1 change: 0 additions & 1 deletion arch/arc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ generic-y += preempt.h
generic-y += resource.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
Expand Down
2 changes: 2 additions & 0 deletions arch/arc/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

generic-y += siginfo.h
2 changes: 1 addition & 1 deletion arch/arc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void __init setup_arch(char **cmdline_p)
void __init time_init(void)
{
of_clk_init(NULL);
clocksource_probe();
timer_probe();
}

static int __init customize_machine(void)
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ config ARCH_MULTIPLATFORM
select ARM_HAS_SG_CHAIN
select ARM_PATCH_PHYS_VIRT
select AUTO_ZRELADDR
select CLKSRC_OF
select TIMER_OF
select COMMON_CLK
select GENERIC_CLOCKEVENTS
select MIGHT_HAVE_PCI
Expand All @@ -351,7 +351,7 @@ config ARM_SINGLE_ARMV7M
depends on !MMU
select ARM_NVIC
select AUTO_ZRELADDR
select CLKSRC_OF
select TIMER_OF
select COMMON_CLK
select CPU_V7M
select GENERIC_CLOCKEVENTS
Expand Down Expand Up @@ -532,7 +532,7 @@ config ARCH_PXA
select CLKDEV_LOOKUP
select CLKSRC_PXA
select CLKSRC_MMIO
select CLKSRC_OF
select TIMER_OF
select CPU_XSCALE if !CPU_XSC3
select GENERIC_CLOCKEVENTS
select GPIO_PXA
Expand Down Expand Up @@ -571,7 +571,7 @@ config ARCH_SA1100
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select CLKSRC_PXA
select CLKSRC_OF if OF
select TIMER_OF if OF
select CPU_FREQ
select CPU_SA1100
select GENERIC_CLOCKEVENTS
Expand Down Expand Up @@ -1357,7 +1357,7 @@ config HAVE_ARM_ARCH_TIMER

config HAVE_ARM_TWD
bool
select CLKSRC_OF if OF
select TIMER_OF if OF
help
This options enables support for the ARM timer and watchdog unit

Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/aspeed-g4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@
//interrupts = <16 17 18 35 36 37 38 39>;
interrupts = <16>;
clocks = <&clk_apb>;
clock-names = "PCLK";
};

wdt1: wdt@1e785000 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/aspeed-g5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@
//interrupts = <16 17 18 35 36 37 38 39>;
interrupts = <16>;
clocks = <&clk_apb>;
clock-names = "PCLK";
};


Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ generic-y += segment.h
generic-y += sembuf.h
generic-y += serial.h
generic-y += shmbuf.h
generic-y += siginfo.h
generic-y += simd.h
generic-y += sizes.h
generic-y += socket.h
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ include include/uapi/asm-generic/Kbuild.asm
genhdr-y += unistd-common.h
genhdr-y += unistd-oabi.h
genhdr-y += unistd-eabi.h

generic-y += siginfo.h
6 changes: 3 additions & 3 deletions arch/arm/kernel/smp_twd.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static int __init twd_local_timer_of_register(struct device_node *np)
WARN(err, "twd_local_timer_of_register failed (%d)\n", err);
return err;
}
CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);
#endif
2 changes: 1 addition & 1 deletion arch/arm/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ void __init time_init(void)
#ifdef CONFIG_COMMON_CLK
of_clk_init(NULL);
#endif
clocksource_probe();
timer_probe();
}
}
2 changes: 1 addition & 1 deletion arch/arm/mach-aspeed/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menuconfig ARCH_ASPEED
select SRAM
select WATCHDOG
select ASPEED_WATCHDOG
select MOXART_TIMER
select FTTMR010_TIMER
select MFD_SYSCON
select PINCTRL
help
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ config ARCH_BCM2835
select ARM_ERRATA_411920 if ARCH_MULTI_V6
select ARM_TIMER_SP804
select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
select CLKSRC_OF
select TIMER_OF
select BCM2835_TIMER
select PINCTRL
select PINCTRL_BCM2835
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-clps711x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ menuconfig ARCH_CLPS711X
bool "Cirrus Logic EP721x/EP731x-based"
depends on ARCH_MULTI_V4T
select AUTO_ZRELADDR
select CLKSRC_OF
select TIMER_OF
select CLPS711X_TIMER
select COMMON_CLK
select CPU_ARM720T
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mediatek/mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void __init mediatek_timer_init(void)
}

of_clk_init(NULL);
clocksource_probe();
timer_probe();
};

static const char * const mediatek_board_dt_compat[] = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-moxart/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menuconfig ARCH_MOXART
select CPU_FA526
select ARM_DMA_MEM_BUFFERABLE
select FARADAY_FTINTC010
select MOXART_TIMER
select FTTMR010_TIMER
select GPIOLIB
select PHYLIB if NETDEVICES
help
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ void __init omap_init_time(void)
__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
2, "timer_sys_ck", NULL, false);

clocksource_probe();
timer_probe();
}

#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
Expand All @@ -506,7 +506,7 @@ void __init omap3_secure_sync32k_timer_init(void)
__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
2, "timer_sys_ck", NULL, false);

clocksource_probe();
timer_probe();
}
#endif /* CONFIG_ARCH_OMAP3 */

Expand All @@ -517,7 +517,7 @@ void __init omap3_gptimer_timer_init(void)
__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
1, "timer_sys_ck", "ti,timer-alwon", true);
if (of_have_populated_dt())
clocksource_probe();
timer_probe();
}
#endif

Expand All @@ -532,7 +532,7 @@ static void __init omap4_sync32k_timer_init(void)
void __init omap4_local_timer_init(void)
{
omap4_sync32k_timer_init();
clocksource_probe();
timer_probe();
}
#endif

Expand Down Expand Up @@ -656,7 +656,7 @@ void __init omap5_realtime_timer_init(void)
omap4_sync32k_timer_init();
realtime_counter_init();

clocksource_probe();
timer_probe();
}
#endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-rockchip/rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void __init rockchip_timer_init(void)
}

of_clk_init(NULL);
clocksource_probe();
timer_probe();
}

static void __init rockchip_dt_init(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ config MACH_SMDK2416

config MACH_S3C2416_DT
bool "Samsung S3C2416 machine using devicetree"
select CLKSRC_OF
select TIMER_OF
select USE_OF
select PINCTRL
select PINCTRL_S3C24XX
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ config MACH_WLF_CRAGG_6410

config MACH_S3C64XX_DT
bool "Samsung S3C6400/S3C6410 machine using Device Tree"
select CLKSRC_OF
select TIMER_OF
select CPU_S3C6400
select CPU_S3C6410
select PINCTRL
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/setup-rcar-gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void __init rcar_gen2_timer_init(void)
#endif /* CONFIG_ARM_ARCH_TIMER */

of_clk_init(NULL);
clocksource_probe();
timer_probe();
}

struct memory_reserve_config {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-spear/spear13xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ void __init spear13xx_timer_init(void)
clk_put(pclk);

spear_setup_of_timer();
clocksource_probe();
timer_probe();
}
2 changes: 1 addition & 1 deletion arch/arm/mach-sunxi/sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void __init sun6i_timer_init(void)
of_clk_init(NULL);
if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
sun6i_reset_init();
clocksource_probe();
timer_probe();
}

DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-u300/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static const char * u300_board_compat[] = {
DT_MACHINE_START(U300_DT, "U300 S335/B335 (Device Tree)")
.map_io = u300_map_io,
.init_irq = u300_init_irq_dt,
.init_time = clocksource_probe,
.init_time = timer_probe,
.init_machine = u300_init_machine_dt,
.restart = u300_restart,
.dt_compat = u300_board_compat,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-zynq/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void __init zynq_timer_init(void)
{
zynq_clock_init();
of_clk_init(NULL);
clocksource_probe();
timer_probe();
}

static struct map_desc zynq_cortex_a9_scu_map __initdata = {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/Kconfig.platforms
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ config ARCH_ALPINE

config ARCH_BCM2835
bool "Broadcom BCM2835 family"
select CLKSRC_OF
select TIMER_OF
select GPIOLIB
select PINCTRL
select PINCTRL_BCM2835
Expand Down Expand Up @@ -178,7 +178,7 @@ config ARCH_TEGRA
select ARCH_HAS_RESET_CONTROLLER
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select CLKSRC_OF
select TIMER_OF
select GENERIC_CLOCKEVENTS
select GPIOLIB
select PINCTRL
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void __init time_init(void)
u32 arch_timer_rate;

of_clk_init(NULL);
clocksource_probe();
timer_probe();

tick_setup_hrtimer_broadcast();

Expand Down
6 changes: 2 additions & 4 deletions arch/arm64/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,8 @@ void update_vsyscall(struct timekeeper *tk)
if (!use_syscall) {
/* tkr_mono.cycle_last == tkr_raw.cycle_last */
vdso_data->cs_cycle_last = tk->tkr_mono.cycle_last;
vdso_data->raw_time_sec = tk->raw_time.tv_sec;
vdso_data->raw_time_nsec = (tk->raw_time.tv_nsec <<
tk->tkr_raw.shift) +
tk->tkr_raw.xtime_nsec;
vdso_data->raw_time_sec = tk->raw_sec;
vdso_data->raw_time_nsec = tk->tkr_raw.xtime_nsec;
vdso_data->xtime_clock_sec = tk->xtime_sec;
vdso_data->xtime_clock_nsec = tk->tkr_mono.xtime_nsec;
vdso_data->cs_mono_mult = tk->tkr_mono.mult;
Expand Down
1 change: 0 additions & 1 deletion arch/c6x/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ generic-y += sembuf.h
generic-y += serial.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
Expand Down
1 change: 1 addition & 0 deletions arch/c6x/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
include include/uapi/asm-generic/Kbuild.asm

generic-y += kvm_para.h
generic-y += siginfo.h
1 change: 0 additions & 1 deletion arch/cris/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ generic-y += resource.h
generic-y += sections.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
Expand Down
2 changes: 2 additions & 0 deletions arch/cris/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

generic-y += siginfo.h
2 changes: 1 addition & 1 deletion arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config H8300
select OF_IRQ
select OF_EARLY_FLATTREE
select HAVE_MEMBLOCK
select CLKSRC_OF
select TIMER_OF
select H8300_TMR8
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZO
Expand Down
1 change: 0 additions & 1 deletion arch/h8300/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ generic-y += serial.h
generic-y += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += sizes.h
generic-y += socket.h
generic-y += sockios.h
Expand Down
2 changes: 2 additions & 0 deletions arch/h8300/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

generic-y += siginfo.h
Loading

0 comments on commit 1b044f1

Please sign in to comment.