aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/kernel/time.c4
-rw-r--r--arch/arm/mach-davinci/time.c2
-rw-r--r--arch/arm/mach-ep93xx/timer-ep93xx.c4
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c2
-rw-r--r--arch/arm/mach-ixp4xx/common.c2
-rw-r--r--arch/arm/mach-mmp/time.c2
-rw-r--r--arch/arm/mach-omap2/timer.c4
-rw-r--r--arch/arm/plat-iop/time.c2
-rw-r--r--arch/avr32/kernel/time.c4
-rw-r--r--arch/blackfin/kernel/time-ts.c4
-rw-r--r--arch/c6x/kernel/time.c2
-rw-r--r--arch/hexagon/kernel/time.c4
-rw-r--r--arch/ia64/kernel/cyclone.c4
-rw-r--r--arch/ia64/kernel/fsyscall_gtod_data.h6
-rw-r--r--arch/ia64/kernel/time.c6
-rw-r--r--arch/ia64/sn/kernel/sn2/timer.c4
-rw-r--r--arch/m68k/68000/timers.c2
-rw-r--r--arch/m68k/coldfire/dma_timer.c2
-rw-r--r--arch/m68k/coldfire/pit.c2
-rw-r--r--arch/m68k/coldfire/sltimers.c2
-rw-r--r--arch/m68k/coldfire/timers.c2
-rw-r--r--arch/microblaze/kernel/timer.c6
-rw-r--r--arch/mips/alchemy/common/time.c2
-rw-r--r--arch/mips/cavium-octeon/csrc-octeon.c2
-rw-r--r--arch/mips/jz4740/time.c2
-rw-r--r--arch/mips/kernel/cevt-txx9.c2
-rw-r--r--arch/mips/kernel/csrc-bcm1480.c4
-rw-r--r--arch/mips/kernel/csrc-ioasic.c2
-rw-r--r--arch/mips/kernel/csrc-r4k.c2
-rw-r--r--arch/mips/kernel/csrc-sb1250.c4
-rw-r--r--arch/mips/loongson32/common/time.c4
-rw-r--r--arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c4
-rw-r--r--arch/mips/loongson64/loongson-3/hpet.c4
-rw-r--r--arch/mips/mti-malta/malta-time.c2
-rw-r--r--arch/mips/netlogic/common/time.c4
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c2
-rw-r--r--arch/mn10300/kernel/csrc-mn10300.c2
-rw-r--r--arch/nios2/kernel/time.c2
-rw-r--r--arch/openrisc/kernel/time.c4
-rw-r--r--arch/parisc/kernel/time.c2
-rw-r--r--arch/powerpc/kernel/time.c14
-rw-r--r--arch/s390/kernel/time.c2
-rw-r--r--arch/sparc/kernel/time_32.c2
-rw-r--r--arch/sparc/kernel/time_64.c2
-rw-r--r--arch/um/kernel/time.c2
-rw-r--r--arch/unicore32/kernel/time.c2
-rw-r--r--arch/x86/entry/vdso/vclock_gettime.c8
-rw-r--r--arch/x86/include/asm/kvm_host.h2
-rw-r--r--arch/x86/include/asm/pvclock.h7
-rw-r--r--arch/x86/include/asm/tsc.h2
-rw-r--r--arch/x86/include/asm/vgtod.h4
-rw-r--r--arch/x86/kernel/apb_timer.c4
-rw-r--r--arch/x86/kernel/cpu/mshyperv.c4
-rw-r--r--arch/x86/kernel/hpet.c14
-rw-r--r--arch/x86/kernel/kvmclock.c10
-rw-r--r--arch/x86/kernel/pvclock.c4
-rw-r--r--arch/x86/kernel/tsc.c6
-rw-r--r--arch/x86/kvm/x86.c14
-rw-r--r--arch/x86/lguest/boot.c2
-rw-r--r--arch/x86/platform/uv/uv_time.c8
-rw-r--r--arch/x86/xen/time.c6
-rw-r--r--arch/x86/xen/xen-ops.h2
-rw-r--r--arch/xtensa/kernel/time.c4
-rw-r--r--drivers/char/hpet.c4
-rw-r--r--drivers/clocksource/acpi_pm.c14
-rw-r--r--drivers/clocksource/arc_timer.c12
-rw-r--r--drivers/clocksource/arm_arch_timer.c4
-rw-r--r--drivers/clocksource/arm_global_timer.c2
-rw-r--r--drivers/clocksource/cadence_ttc_timer.c4
-rw-r--r--drivers/clocksource/clksrc-dbx500-prcmu.c2
-rw-r--r--drivers/clocksource/dw_apb_timer.c8
-rw-r--r--drivers/clocksource/em_sti.c12
-rw-r--r--drivers/clocksource/exynos_mct.c6
-rw-r--r--drivers/clocksource/h8300_timer16.c2
-rw-r--r--drivers/clocksource/h8300_tpu.c2
-rw-r--r--drivers/clocksource/i8253.c4
-rw-r--r--drivers/clocksource/jcore-pit.c2
-rw-r--r--drivers/clocksource/metag_generic.c2
-rw-r--r--drivers/clocksource/mips-gic-timer.c2
-rw-r--r--drivers/clocksource/mmio.c18
-rw-r--r--drivers/clocksource/mxs_timer.c2
-rw-r--r--drivers/clocksource/qcom-timer.c2
-rw-r--r--drivers/clocksource/samsung_pwm_timer.c2
-rw-r--r--drivers/clocksource/scx200_hrt.c4
-rw-r--r--drivers/clocksource/sh_cmt.c2
-rw-r--r--drivers/clocksource/sh_tmu.c2
-rw-r--r--drivers/clocksource/tcb_clksrc.c4
-rw-r--r--drivers/clocksource/time-pistachio.c4
-rw-r--r--drivers/clocksource/timer-atlas7.c2
-rw-r--r--drivers/clocksource/timer-atmel-pit.c2
-rw-r--r--drivers/clocksource/timer-atmel-st.c2
-rw-r--r--drivers/clocksource/timer-nps.c4
-rw-r--r--drivers/clocksource/timer-prima2.c2
-rw-r--r--drivers/clocksource/timer-sun5i.c2
-rw-r--r--drivers/clocksource/timer-ti-32k.c4
-rw-r--r--drivers/clocksource/vt8500_timer.c4
-rw-r--r--drivers/hv/hv.c8
-rw-r--r--drivers/irqchip/irq-mips-gic.c16
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-ptp.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c2
-rw-r--r--drivers/net/ethernet/freescale/fec_ptp.c2
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c18
-rw-r--r--drivers/net/ethernet/intel/e1000e/ptp.c4
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ptp.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_clock.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_clock.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/main.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h2
-rw-r--r--drivers/net/ethernet/ti/cpts.c2
-rw-r--r--include/kvm/arm_arch_timer.h4
-rw-r--r--include/linux/clocksource.h22
-rw-r--r--include/linux/dw_apb_timer.h2
-rw-r--r--include/linux/irqchip/mips-gic.h8
-rw-r--r--include/linux/mlx4/device.h2
-rw-r--r--include/linux/timecounter.h12
-rw-r--r--include/linux/timekeeper_internal.h10
-rw-r--r--include/linux/timekeeping.h4
-rw-r--r--include/linux/types.h3
-rw-r--r--kernel/time/clocksource.c2
-rw-r--r--kernel/time/jiffies.c4
-rw-r--r--kernel/time/timecounter.c6
-rw-r--r--kernel/time/timekeeping.c57
-rw-r--r--kernel/time/timekeeping_internal.h6
-rw-r--r--kernel/trace/ftrace.c4
-rw-r--r--kernel/trace/trace.c6
-rw-r--r--kernel/trace/trace.h8
-rw-r--r--kernel/trace/trace_irqsoff.c4
-rw-r--r--kernel/trace/trace_sched_wakeup.c4
-rw-r--r--sound/hda/hdac_stream.c6
-rw-r--r--virt/kvm/arm/arch_timer.c6
132 files changed, 320 insertions, 327 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 992000e3d9e4..3bfe058d75d9 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -133,7 +133,7 @@ init_rtc_clockevent(void)
133 * The QEMU clock as a clocksource primitive. 133 * The QEMU clock as a clocksource primitive.
134 */ 134 */
135 135
136static cycle_t 136static u64
137qemu_cs_read(struct clocksource *cs) 137qemu_cs_read(struct clocksource *cs)
138{ 138{
139 return qemu_get_vmtime(); 139 return qemu_get_vmtime();
@@ -260,7 +260,7 @@ common_init_rtc(void)
260 * use this method when WTINT is in use. 260 * use this method when WTINT is in use.
261 */ 261 */
262 262
263static cycle_t read_rpcc(struct clocksource *cs) 263static u64 read_rpcc(struct clocksource *cs)
264{ 264{
265 return rpcc(); 265 return rpcc();
266} 266}
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 6c18445a4639..034f865fe78e 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -268,7 +268,7 @@ static void __init timer_init(void)
268/* 268/*
269 * clocksource 269 * clocksource
270 */ 270 */
271static cycle_t read_cycles(struct clocksource *cs) 271static u64 read_cycles(struct clocksource *cs)
272{ 272{
273 struct timer_s *t = &timers[TID_CLOCKSOURCE]; 273 struct timer_s *t = &timers[TID_CLOCKSOURCE];
274 274
diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
index e5f791145bd0..874cbc91b669 100644
--- a/arch/arm/mach-ep93xx/timer-ep93xx.c
+++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
@@ -59,13 +59,13 @@ static u64 notrace ep93xx_read_sched_clock(void)
59 return ret; 59 return ret;
60} 60}
61 61
62cycle_t ep93xx_clocksource_read(struct clocksource *c) 62u64 ep93xx_clocksource_read(struct clocksource *c)
63{ 63{
64 u64 ret; 64 u64 ret;
65 65
66 ret = readl(EP93XX_TIMER4_VALUE_LOW); 66 ret = readl(EP93XX_TIMER4_VALUE_LOW);
67 ret |= ((u64) (readl(EP93XX_TIMER4_VALUE_HIGH) & 0xff) << 32); 67 ret |= ((u64) (readl(EP93XX_TIMER4_VALUE_HIGH) & 0xff) << 32);
68 return (cycle_t) ret; 68 return (u64) ret;
69} 69}
70 70
71static int ep93xx_clkevt_set_next_event(unsigned long next, 71static int ep93xx_clkevt_set_next_event(unsigned long next,
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index 810edc78c817..75395a720e63 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -19,7 +19,7 @@
19 19
20#include "common.h" 20#include "common.h"
21 21
22static cycle_t cksrc_dc21285_read(struct clocksource *cs) 22static u64 cksrc_dc21285_read(struct clocksource *cs)
23{ 23{
24 return cs->mask - *CSR_TIMER2_VALUE; 24 return cs->mask - *CSR_TIMER2_VALUE;
25} 25}
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 0f08f611c1a6..846e033c56fa 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -493,7 +493,7 @@ static u64 notrace ixp4xx_read_sched_clock(void)
493 * clocksource 493 * clocksource
494 */ 494 */
495 495
496static cycle_t ixp4xx_clocksource_read(struct clocksource *c) 496static u64 ixp4xx_clocksource_read(struct clocksource *c)
497{ 497{
498 return *IXP4XX_OSTS; 498 return *IXP4XX_OSTS;
499} 499}
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 3c2c92aaa0ae..96ad1db0b04b 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -144,7 +144,7 @@ static struct clock_event_device ckevt = {
144 .set_state_oneshot = timer_set_shutdown, 144 .set_state_oneshot = timer_set_shutdown,
145}; 145};
146 146
147static cycle_t clksrc_read(struct clocksource *cs) 147static u64 clksrc_read(struct clocksource *cs)
148{ 148{
149 return timer_read(); 149 return timer_read();
150} 150}
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 5e2e2218a402..56128da23c3a 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -369,9 +369,9 @@ static bool use_gptimer_clksrc __initdata;
369/* 369/*
370 * clocksource 370 * clocksource
371 */ 371 */
372static cycle_t clocksource_read_cycles(struct clocksource *cs) 372static u64 clocksource_read_cycles(struct clocksource *cs)
373{ 373{
374 return (cycle_t)__omap_dm_timer_read_counter(&clksrc, 374 return (u64)__omap_dm_timer_read_counter(&clksrc,
375 OMAP_TIMER_NONPOSTED); 375 OMAP_TIMER_NONPOSTED);
376} 376}
377 377
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index ed8d129d4bea..2cff0010f677 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -38,7 +38,7 @@
38/* 38/*
39 * IOP clocksource (free-running timer 1). 39 * IOP clocksource (free-running timer 1).
40 */ 40 */
41static cycle_t notrace iop_clocksource_read(struct clocksource *unused) 41static u64 notrace iop_clocksource_read(struct clocksource *unused)
42{ 42{
43 return 0xffffffffu - read_tcr1(); 43 return 0xffffffffu - read_tcr1();
44} 44}
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index a124c55733db..4d9b69615979 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -20,9 +20,9 @@
20 20
21static bool disable_cpu_idle_poll; 21static bool disable_cpu_idle_poll;
22 22
23static cycle_t read_cycle_count(struct clocksource *cs) 23static u64 read_cycle_count(struct clocksource *cs)
24{ 24{
25 return (cycle_t)sysreg_read(COUNT); 25 return (u64)sysreg_read(COUNT);
26} 26}
27 27
28/* 28/*
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c
index fb9e95f1b719..0e9fcf841d67 100644
--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -26,7 +26,7 @@
26 26
27#if defined(CONFIG_CYCLES_CLOCKSOURCE) 27#if defined(CONFIG_CYCLES_CLOCKSOURCE)
28 28
29static notrace cycle_t bfin_read_cycles(struct clocksource *cs) 29static notrace u64 bfin_read_cycles(struct clocksource *cs)
30{ 30{
31#ifdef CONFIG_CPU_FREQ 31#ifdef CONFIG_CPU_FREQ
32 return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod); 32 return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
@@ -80,7 +80,7 @@ void __init setup_gptimer0(void)
80 enable_gptimers(TIMER0bit); 80 enable_gptimers(TIMER0bit);
81} 81}
82 82
83static cycle_t bfin_read_gptimer0(struct clocksource *cs) 83static u64 bfin_read_gptimer0(struct clocksource *cs)
84{ 84{
85 return bfin_read_TIMER0_COUNTER(); 85 return bfin_read_TIMER0_COUNTER();
86} 86}
diff --git a/arch/c6x/kernel/time.c b/arch/c6x/kernel/time.c
index 04845aaf5985..6a8e00a1f6d5 100644
--- a/arch/c6x/kernel/time.c
+++ b/arch/c6x/kernel/time.c
@@ -26,7 +26,7 @@
26static u32 sched_clock_multiplier; 26static u32 sched_clock_multiplier;
27#define SCHED_CLOCK_SHIFT 16 27#define SCHED_CLOCK_SHIFT 16
28 28
29static cycle_t tsc_read(struct clocksource *cs) 29static u64 tsc_read(struct clocksource *cs)
30{ 30{
31 return get_cycles(); 31 return get_cycles();
32} 32}
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
index a6a1d1f8309a..ff4e9bf995e9 100644
--- a/arch/hexagon/kernel/time.c
+++ b/arch/hexagon/kernel/time.c
@@ -72,9 +72,9 @@ struct adsp_hw_timer_struct {
72/* Look for "TCX0" for related constants. */ 72/* Look for "TCX0" for related constants. */
73static __iomem struct adsp_hw_timer_struct *rtos_timer; 73static __iomem struct adsp_hw_timer_struct *rtos_timer;
74 74
75static cycle_t timer_get_cycles(struct clocksource *cs) 75static u64 timer_get_cycles(struct clocksource *cs)
76{ 76{
77 return (cycle_t) __vmgettime(); 77 return (u64) __vmgettime();
78} 78}
79 79
80static struct clocksource hexagon_clocksource = { 80static struct clocksource hexagon_clocksource = {
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index 5fa3848ba224..ee1a4afbf9da 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -21,9 +21,9 @@ void __init cyclone_setup(void)
21 21
22static void __iomem *cyclone_mc; 22static void __iomem *cyclone_mc;
23 23
24static cycle_t read_cyclone(struct clocksource *cs) 24static u64 read_cyclone(struct clocksource *cs)
25{ 25{
26 return (cycle_t)readq((void __iomem *)cyclone_mc); 26 return (u64)readq((void __iomem *)cyclone_mc);
27} 27}
28 28
29static struct clocksource clocksource_cyclone = { 29static struct clocksource clocksource_cyclone = {
diff --git a/arch/ia64/kernel/fsyscall_gtod_data.h b/arch/ia64/kernel/fsyscall_gtod_data.h
index 146b15b5fec3..dcc514917731 100644
--- a/arch/ia64/kernel/fsyscall_gtod_data.h
+++ b/arch/ia64/kernel/fsyscall_gtod_data.h
@@ -9,15 +9,15 @@ struct fsyscall_gtod_data_t {
9 seqcount_t seq; 9 seqcount_t seq;
10 struct timespec wall_time; 10 struct timespec wall_time;
11 struct timespec monotonic_time; 11 struct timespec monotonic_time;
12 cycle_t clk_mask; 12 u64 clk_mask;
13 u32 clk_mult; 13 u32 clk_mult;
14 u32 clk_shift; 14 u32 clk_shift;
15 void *clk_fsys_mmio; 15 void *clk_fsys_mmio;
16 cycle_t clk_cycle_last; 16 u64 clk_cycle_last;
17} ____cacheline_aligned; 17} ____cacheline_aligned;
18 18
19struct itc_jitter_data_t { 19struct itc_jitter_data_t {
20 int itc_jitter; 20 int itc_jitter;
21 cycle_t itc_lastcycle; 21 u64 itc_lastcycle;
22} ____cacheline_aligned; 22} ____cacheline_aligned;
23 23
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 021f44ab4bfb..71775b95d6cc 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -31,7 +31,7 @@
31 31
32#include "fsyscall_gtod_data.h" 32#include "fsyscall_gtod_data.h"
33 33
34static cycle_t itc_get_cycles(struct clocksource *cs); 34static u64 itc_get_cycles(struct clocksource *cs);
35 35
36struct fsyscall_gtod_data_t fsyscall_gtod_data; 36struct fsyscall_gtod_data_t fsyscall_gtod_data;
37 37
@@ -323,7 +323,7 @@ void ia64_init_itm(void)
323 } 323 }
324} 324}
325 325
326static cycle_t itc_get_cycles(struct clocksource *cs) 326static u64 itc_get_cycles(struct clocksource *cs)
327{ 327{
328 unsigned long lcycle, now, ret; 328 unsigned long lcycle, now, ret;
329 329
@@ -397,7 +397,7 @@ void update_vsyscall_tz(void)
397} 397}
398 398
399void update_vsyscall_old(struct timespec *wall, struct timespec *wtm, 399void update_vsyscall_old(struct timespec *wall, struct timespec *wtm,
400 struct clocksource *c, u32 mult, cycle_t cycle_last) 400 struct clocksource *c, u32 mult, u64 cycle_last)
401{ 401{
402 write_seqcount_begin(&fsyscall_gtod_data.seq); 402 write_seqcount_begin(&fsyscall_gtod_data.seq);
403 403
diff --git a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c
index abab8f99e913..66edc36426ed 100644
--- a/arch/ia64/sn/kernel/sn2/timer.c
+++ b/arch/ia64/sn/kernel/sn2/timer.c
@@ -22,9 +22,9 @@
22 22
23extern unsigned long sn_rtc_cycles_per_second; 23extern unsigned long sn_rtc_cycles_per_second;
24 24
25static cycle_t read_sn2(struct clocksource *cs) 25static u64 read_sn2(struct clocksource *cs)
26{ 26{
27 return (cycle_t)readq(RTC_COUNTER_ADDR); 27 return (u64)readq(RTC_COUNTER_ADDR);
28} 28}
29 29
30static struct clocksource clocksource_sn2 = { 30static struct clocksource clocksource_sn2 = {
diff --git a/arch/m68k/68000/timers.c b/arch/m68k/68000/timers.c
index 99a98698bc95..252455bce144 100644
--- a/arch/m68k/68000/timers.c
+++ b/arch/m68k/68000/timers.c
@@ -76,7 +76,7 @@ static struct irqaction m68328_timer_irq = {
76 76
77/***************************************************************************/ 77/***************************************************************************/
78 78
79static cycle_t m68328_read_clk(struct clocksource *cs) 79static u64 m68328_read_clk(struct clocksource *cs)
80{ 80{
81 unsigned long flags; 81 unsigned long flags;
82 u32 cycles; 82 u32 cycles;
diff --git a/arch/m68k/coldfire/dma_timer.c b/arch/m68k/coldfire/dma_timer.c
index 235ad57c4707..8273eea57874 100644
--- a/arch/m68k/coldfire/dma_timer.c
+++ b/arch/m68k/coldfire/dma_timer.c
@@ -34,7 +34,7 @@
34#define DMA_DTMR_CLK_DIV_16 (2 << 1) 34#define DMA_DTMR_CLK_DIV_16 (2 << 1)
35#define DMA_DTMR_ENABLE (1 << 0) 35#define DMA_DTMR_ENABLE (1 << 0)
36 36
37static cycle_t cf_dt_get_cycles(struct clocksource *cs) 37static u64 cf_dt_get_cycles(struct clocksource *cs)
38{ 38{
39 return __raw_readl(DTCN0); 39 return __raw_readl(DTCN0);
40} 40}
diff --git a/arch/m68k/coldfire/pit.c b/arch/m68k/coldfire/pit.c
index d86a9ffb3f13..175553d5b8ed 100644
--- a/arch/m68k/coldfire/pit.c
+++ b/arch/m68k/coldfire/pit.c
@@ -118,7 +118,7 @@ static struct irqaction pit_irq = {
118 118
119/***************************************************************************/ 119/***************************************************************************/
120 120
121static cycle_t pit_read_clk(struct clocksource *cs) 121static u64 pit_read_clk(struct clocksource *cs)
122{ 122{
123 unsigned long flags; 123 unsigned long flags;
124 u32 cycles; 124 u32 cycles;
diff --git a/arch/m68k/coldfire/sltimers.c b/arch/m68k/coldfire/sltimers.c
index 831a08cf6f40..3292c0d68b18 100644
--- a/arch/m68k/coldfire/sltimers.c
+++ b/arch/m68k/coldfire/sltimers.c
@@ -97,7 +97,7 @@ static struct irqaction mcfslt_timer_irq = {
97 .handler = mcfslt_tick, 97 .handler = mcfslt_tick,
98}; 98};
99 99
100static cycle_t mcfslt_read_clk(struct clocksource *cs) 100static u64 mcfslt_read_clk(struct clocksource *cs)
101{ 101{
102 unsigned long flags; 102 unsigned long flags;
103 u32 cycles, scnt; 103 u32 cycles, scnt;
diff --git a/arch/m68k/coldfire/timers.c b/arch/m68k/coldfire/timers.c
index cd496a20fcc7..2dc7a58204f6 100644
--- a/arch/m68k/coldfire/timers.c
+++ b/arch/m68k/coldfire/timers.c
@@ -89,7 +89,7 @@ static struct irqaction mcftmr_timer_irq = {
89 89
90/***************************************************************************/ 90/***************************************************************************/
91 91
92static cycle_t mcftmr_read_clk(struct clocksource *cs) 92static u64 mcftmr_read_clk(struct clocksource *cs)
93{ 93{
94 unsigned long flags; 94 unsigned long flags;
95 u32 cycles; 95 u32 cycles;
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 9e954959f605..1d6fad50fa76 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -190,17 +190,17 @@ static u64 xilinx_clock_read(void)
190 return read_fn(timer_baseaddr + TCR1); 190 return read_fn(timer_baseaddr + TCR1);
191} 191}
192 192
193static cycle_t xilinx_read(struct clocksource *cs) 193static u64 xilinx_read(struct clocksource *cs)
194{ 194{
195 /* reading actual value of timer 1 */ 195 /* reading actual value of timer 1 */
196 return (cycle_t)xilinx_clock_read(); 196 return (u64)xilinx_clock_read();
197} 197}
198 198
199static struct timecounter xilinx_tc = { 199static struct timecounter xilinx_tc = {
200 .cc = NULL, 200 .cc = NULL,
201}; 201};
202 202
203static cycle_t xilinx_cc_read(const struct cyclecounter *cc) 203static u64 xilinx_cc_read(const struct cyclecounter *cc)
204{ 204{
205 return xilinx_read(NULL); 205 return xilinx_read(NULL);
206} 206}
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index f99d3ec17a45..e1bec5a77c39 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -44,7 +44,7 @@
44/* 32kHz clock enabled and detected */ 44/* 32kHz clock enabled and detected */
45#define CNTR_OK (SYS_CNTRL_E0 | SYS_CNTRL_32S) 45#define CNTR_OK (SYS_CNTRL_E0 | SYS_CNTRL_32S)
46 46
47static cycle_t au1x_counter1_read(struct clocksource *cs) 47static u64 au1x_counter1_read(struct clocksource *cs)
48{ 48{
49 return alchemy_rdsys(AU1000_SYS_RTCREAD); 49 return alchemy_rdsys(AU1000_SYS_RTCREAD);
50} 50}
diff --git a/arch/mips/cavium-octeon/csrc-octeon.c b/arch/mips/cavium-octeon/csrc-octeon.c
index 23c2344a3552..39f153fe0022 100644
--- a/arch/mips/cavium-octeon/csrc-octeon.c
+++ b/arch/mips/cavium-octeon/csrc-octeon.c
@@ -98,7 +98,7 @@ void octeon_init_cvmcount(void)
98 local_irq_restore(flags); 98 local_irq_restore(flags);
99} 99}
100 100
101static cycle_t octeon_cvmcount_read(struct clocksource *cs) 101static u64 octeon_cvmcount_read(struct clocksource *cs)
102{ 102{
103 return read_c0_cvmcount(); 103 return read_c0_cvmcount();
104} 104}
diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c
index 1f7ca2c9f262..bcf8f8c62737 100644
--- a/arch/mips/jz4740/time.c
+++ b/arch/mips/jz4740/time.c
@@ -34,7 +34,7 @@
34 34
35static uint16_t jz4740_jiffies_per_tick; 35static uint16_t jz4740_jiffies_per_tick;
36 36
37static cycle_t jz4740_clocksource_read(struct clocksource *cs) 37static u64 jz4740_clocksource_read(struct clocksource *cs)
38{ 38{
39 return jz4740_timer_get_count(TIMER_CLOCKSOURCE); 39 return jz4740_timer_get_count(TIMER_CLOCKSOURCE);
40} 40}
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c
index 537eefdf838f..aaca60d6ffc3 100644
--- a/arch/mips/kernel/cevt-txx9.c
+++ b/arch/mips/kernel/cevt-txx9.c
@@ -27,7 +27,7 @@ struct txx9_clocksource {
27 struct txx9_tmr_reg __iomem *tmrptr; 27 struct txx9_tmr_reg __iomem *tmrptr;
28}; 28};
29 29
30static cycle_t txx9_cs_read(struct clocksource *cs) 30static u64 txx9_cs_read(struct clocksource *cs)
31{ 31{
32 struct txx9_clocksource *txx9_cs = 32 struct txx9_clocksource *txx9_cs =
33 container_of(cs, struct txx9_clocksource, cs); 33 container_of(cs, struct txx9_clocksource, cs);
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c
index 7f65b53d1b24..f011261e9506 100644
--- a/arch/mips/kernel/csrc-bcm1480.c
+++ b/arch/mips/kernel/csrc-bcm1480.c
@@ -25,9 +25,9 @@
25 25
26#include <asm/sibyte/sb1250.h> 26#include <asm/sibyte/sb1250.h>
27 27
28static cycle_t bcm1480_hpt_read(struct clocksource *cs) 28static u64 bcm1480_hpt_read(struct clocksource *cs)
29{ 29{
30 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); 30 return (u64) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
31} 31}
32 32
33struct clocksource bcm1480_clocksource = { 33struct clocksource bcm1480_clocksource = {
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c
index 722f5589cd1d..f6acd1e58c26 100644
--- a/arch/mips/kernel/csrc-ioasic.c
+++ b/arch/mips/kernel/csrc-ioasic.c
@@ -22,7 +22,7 @@
22#include <asm/dec/ioasic.h> 22#include <asm/dec/ioasic.h>
23#include <asm/dec/ioasic_addrs.h> 23#include <asm/dec/ioasic_addrs.h>
24 24
25static cycle_t dec_ioasic_hpt_read(struct clocksource *cs) 25static u64 dec_ioasic_hpt_read(struct clocksource *cs)
26{ 26{
27 return ioasic_read(IO_REG_FCTR); 27 return ioasic_read(IO_REG_FCTR);
28} 28}
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
index d76275da54cb..eed099f35bf1 100644
--- a/arch/mips/kernel/csrc-r4k.c
+++ b/arch/mips/kernel/csrc-r4k.c
@@ -11,7 +11,7 @@
11 11
12#include <asm/time.h> 12#include <asm/time.h>
13 13
14static cycle_t c0_hpt_read(struct clocksource *cs) 14static u64 c0_hpt_read(struct clocksource *cs)
15{ 15{
16 return read_c0_count(); 16 return read_c0_count();
17} 17}
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c
index d915652b4d56..b07b7310d3f4 100644
--- a/arch/mips/kernel/csrc-sb1250.c
+++ b/arch/mips/kernel/csrc-sb1250.c
@@ -30,7 +30,7 @@
30 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over 30 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
31 * again. 31 * again.
32 */ 32 */
33static inline cycle_t sb1250_hpt_get_cycles(void) 33static inline u64 sb1250_hpt_get_cycles(void)
34{ 34{
35 unsigned int count; 35 unsigned int count;
36 void __iomem *addr; 36 void __iomem *addr;
@@ -41,7 +41,7 @@ static inline cycle_t sb1250_hpt_get_cycles(void)
41 return SB1250_HPT_VALUE - count; 41 return SB1250_HPT_VALUE - count;
42} 42}
43 43
44static cycle_t sb1250_hpt_read(struct clocksource *cs) 44static u64 sb1250_hpt_read(struct clocksource *cs)
45{ 45{
46 return sb1250_hpt_get_cycles(); 46 return sb1250_hpt_get_cycles();
47} 47}
diff --git a/arch/mips/loongson32/common/time.c b/arch/mips/loongson32/common/time.c
index ff224f0020e5..e6f972d35252 100644
--- a/arch/mips/loongson32/common/time.c
+++ b/arch/mips/loongson32/common/time.c
@@ -63,7 +63,7 @@ void __init ls1x_pwmtimer_init(void)
63 ls1x_pwmtimer_restart(); 63 ls1x_pwmtimer_restart();
64} 64}
65 65
66static cycle_t ls1x_clocksource_read(struct clocksource *cs) 66static u64 ls1x_clocksource_read(struct clocksource *cs)
67{ 67{
68 unsigned long flags; 68 unsigned long flags;
69 int count; 69 int count;
@@ -107,7 +107,7 @@ static cycle_t ls1x_clocksource_read(struct clocksource *cs)
107 107
108 raw_spin_unlock_irqrestore(&ls1x_timer_lock, flags); 108 raw_spin_unlock_irqrestore(&ls1x_timer_lock, flags);
109 109
110 return (cycle_t) (jifs * ls1x_jiffies_per_tick) + count; 110 return (u64) (jifs * ls1x_jiffies_per_tick) + count;
111} 111}
112 112
113static struct clocksource ls1x_clocksource = { 113static struct clocksource ls1x_clocksource = {
diff --git a/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c
index da77d412514c..9edfa55a0e78 100644
--- a/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c
+++ b/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c
@@ -144,7 +144,7 @@ void __init setup_mfgpt0_timer(void)
144 * to just read by itself. So use jiffies to emulate a free 144 * to just read by itself. So use jiffies to emulate a free
145 * running counter: 145 * running counter:
146 */ 146 */
147static cycle_t mfgpt_read(struct clocksource *cs) 147static u64 mfgpt_read(struct clocksource *cs)
148{ 148{
149 unsigned long flags; 149 unsigned long flags;
150 int count; 150 int count;
@@ -188,7 +188,7 @@ static cycle_t mfgpt_read(struct clocksource *cs)
188 188
189 raw_spin_unlock_irqrestore(&mfgpt_lock, flags); 189 raw_spin_unlock_irqrestore(&mfgpt_lock, flags);
190 190
191 return (cycle_t) (jifs * COMPARE) + count; 191 return (u64) (jifs * COMPARE) + count;
192} 192}
193 193
194static struct clocksource clocksource_mfgpt = { 194static struct clocksource clocksource_mfgpt = {
diff --git a/arch/mips/loongson64/loongson-3/hpet.c b/arch/mips/loongson64/loongson-3/hpet.c
index 4788bea62a6a..24afe364637b 100644
--- a/arch/mips/loongson64/loongson-3/hpet.c
+++ b/arch/mips/loongson64/loongson-3/hpet.c
@@ -248,9 +248,9 @@ void __init setup_hpet_timer(void)
248 pr_info("hpet clock event device register\n"); 248 pr_info("hpet clock event device register\n");
249} 249}
250 250
251static cycle_t hpet_read_counter(struct clocksource *cs) 251static u64 hpet_read_counter(struct clocksource *cs)
252{ 252{
253 return (cycle_t)hpet_read(HPET_COUNTER); 253 return (u64)hpet_read(HPET_COUNTER);
254} 254}
255 255
256static void hpet_suspend(struct clocksource *cs) 256static void hpet_suspend(struct clocksource *cs)
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 7407da04f8d6..1829a9031eec 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -75,7 +75,7 @@ static void __init estimate_frequencies(void)
75 unsigned int count, start; 75 unsigned int count, start;
76 unsigned char secs1, secs2, ctrl; 76 unsigned char secs1, secs2, ctrl;
77 int secs; 77 int secs;
78 cycle_t giccount = 0, gicstart = 0; 78 u64 giccount = 0, gicstart = 0;
79 79
80#if defined(CONFIG_KVM_GUEST) && CONFIG_KVM_GUEST_TIMER_FREQ 80#if defined(CONFIG_KVM_GUEST) && CONFIG_KVM_GUEST_TIMER_FREQ
81 mips_hpt_frequency = CONFIG_KVM_GUEST_TIMER_FREQ * 1000000; 81 mips_hpt_frequency = CONFIG_KVM_GUEST_TIMER_FREQ * 1000000;
diff --git a/arch/mips/netlogic/common/time.c b/arch/mips/netlogic/common/time.c
index 5873c83e65be..cbbf0d48216b 100644
--- a/arch/mips/netlogic/common/time.c
+++ b/arch/mips/netlogic/common/time.c
@@ -59,14 +59,14 @@ unsigned int get_c0_compare_int(void)
59 return IRQ_TIMER; 59 return IRQ_TIMER;
60} 60}
61 61
62static cycle_t nlm_get_pic_timer(struct clocksource *cs) 62static u64 nlm_get_pic_timer(struct clocksource *cs)
63{ 63{
64 uint64_t picbase = nlm_get_node(0)->picbase; 64 uint64_t picbase = nlm_get_node(0)->picbase;
65 65
66 return ~nlm_pic_read_timer(picbase, PIC_CLOCK_TIMER); 66 return ~nlm_pic_read_timer(picbase, PIC_CLOCK_TIMER);
67} 67}
68 68
69static cycle_t nlm_get_pic_timer32(struct clocksource *cs) 69static u64 nlm_get_pic_timer32(struct clocksource *cs)
70{ 70{
71 uint64_t picbase = nlm_get_node(0)->picbase; 71 uint64_t picbase = nlm_get_node(0)->picbase;
72 72
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 42d6cb9f956e..695c51bdd7dc 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -140,7 +140,7 @@ static void __init hub_rt_clock_event_global_init(void)
140 setup_irq(irq, &hub_rt_irqaction); 140 setup_irq(irq, &hub_rt_irqaction);
141} 141}
142 142
143static cycle_t hub_rt_read(struct clocksource *cs) 143static u64 hub_rt_read(struct clocksource *cs)
144{ 144{
145 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); 145 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
146} 146}
diff --git a/arch/mn10300/kernel/csrc-mn10300.c b/arch/mn10300/kernel/csrc-mn10300.c
index 45644cf18c41..6b74df3661f2 100644
--- a/arch/mn10300/kernel/csrc-mn10300.c
+++ b/arch/mn10300/kernel/csrc-mn10300.c
@@ -13,7 +13,7 @@
13#include <asm/timex.h> 13#include <asm/timex.h>
14#include "internal.h" 14#include "internal.h"
15 15
16static cycle_t mn10300_read(struct clocksource *cs) 16static u64 mn10300_read(struct clocksource *cs)
17{ 17{
18 return read_timestamp_counter(); 18 return read_timestamp_counter();
19} 19}
diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c
index 746bf5caaffc..6e2bdc9b8530 100644
--- a/arch/nios2/kernel/time.c
+++ b/arch/nios2/kernel/time.c
@@ -81,7 +81,7 @@ static inline unsigned long read_timersnapshot(struct nios2_timer *timer)
81 return count; 81 return count;
82} 82}
83 83
84static cycle_t nios2_timer_read(struct clocksource *cs) 84static u64 nios2_timer_read(struct clocksource *cs)
85{ 85{
86 struct nios2_clocksource *nios2_cs = to_nios2_clksource(cs); 86 struct nios2_clocksource *nios2_cs = to_nios2_clksource(cs);
87 unsigned long flags; 87 unsigned long flags;
diff --git a/arch/openrisc/kernel/time.c b/arch/openrisc/kernel/time.c
index 50e970183dcd..687c11d048d7 100644
--- a/arch/openrisc/kernel/time.c
+++ b/arch/openrisc/kernel/time.c
@@ -117,9 +117,9 @@ static __init void openrisc_clockevent_init(void)
117 * is 32 bits wide and runs at the CPU clock frequency. 117 * is 32 bits wide and runs at the CPU clock frequency.
118 */ 118 */
119 119
120static cycle_t openrisc_timer_read(struct clocksource *cs) 120static u64 openrisc_timer_read(struct clocksource *cs)
121{ 121{
122 return (cycle_t) mfspr(SPR_TTCR); 122 return (u64) mfspr(SPR_TTCR);
123} 123}
124 124
125static struct clocksource openrisc_timer = { 125static struct clocksource openrisc_timer = {
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 037d81f00520..da0d9cb63403 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -137,7 +137,7 @@ EXPORT_SYMBOL(profile_pc);
137 137
138/* clock source code */ 138/* clock source code */
139 139
140static cycle_t notrace read_cr16(struct clocksource *cs) 140static u64 notrace read_cr16(struct clocksource *cs)
141{ 141{
142 return get_cycles(); 142 return get_cycles();
143} 143}
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 19397e2a8bf5..bc2e08d415fa 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -80,7 +80,7 @@
80#include <linux/clockchips.h> 80#include <linux/clockchips.h>
81#include <linux/timekeeper_internal.h> 81#include <linux/timekeeper_internal.h>
82 82
83static cycle_t rtc_read(struct clocksource *); 83static u64 rtc_read(struct clocksource *);
84static struct clocksource clocksource_rtc = { 84static struct clocksource clocksource_rtc = {
85 .name = "rtc", 85 .name = "rtc",
86 .rating = 400, 86 .rating = 400,
@@ -89,7 +89,7 @@ static struct clocksource clocksource_rtc = {
89 .read = rtc_read, 89 .read = rtc_read,
90}; 90};
91 91
92static cycle_t timebase_read(struct clocksource *); 92static u64 timebase_read(struct clocksource *);
93static struct clocksource clocksource_timebase = { 93static struct clocksource clocksource_timebase = {
94 .name = "timebase", 94 .name = "timebase",
95 .rating = 400, 95 .rating = 400,
@@ -802,18 +802,18 @@ void read_persistent_clock(struct timespec *ts)
802} 802}
803 803
804/* clocksource code */ 804/* clocksource code */
805static cycle_t rtc_read(struct clocksource *cs) 805static u64 rtc_read(struct clocksource *cs)
806{ 806{
807 return (cycle_t)get_rtc(); 807 return (u64)get_rtc();
808} 808}
809 809
810static cycle_t timebase_read(struct clocksource *cs) 810static u64 timebase_read(struct clocksource *cs)
811{ 811{
812 return (cycle_t)get_tb(); 812 return (u64)get_tb();
813} 813}
814 814
815void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, 815void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
816 struct clocksource *clock, u32 mult, cycle_t cycle_last) 816 struct clocksource *clock, u32 mult, u64 cycle_last)
817{ 817{
818 u64 new_tb_to_xs, new_stamp_xsec; 818 u64 new_tb_to_xs, new_stamp_xsec;
819 u32 frac_sec; 819 u32 frac_sec;
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index ec76315c9ee5..52949df88529 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -209,7 +209,7 @@ void read_boot_clock64(struct timespec64 *ts)
209 tod_to_timeval(clock - TOD_UNIX_EPOCH, ts); 209 tod_to_timeval(clock - TOD_UNIX_EPOCH, ts);
210} 210}
211 211
212static cycle_t read_tod_clock(struct clocksource *cs) 212static u64 read_tod_clock(struct clocksource *cs)
213{ 213{
214 unsigned long long now, adj; 214 unsigned long long now, adj;
215 215
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 1affabc96b08..244062bdaa56 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -148,7 +148,7 @@ static unsigned int sbus_cycles_offset(void)
148 return offset; 148 return offset;
149} 149}
150 150
151static cycle_t timer_cs_read(struct clocksource *cs) 151static u64 timer_cs_read(struct clocksource *cs)
152{ 152{
153 unsigned int seq, offset; 153 unsigned int seq, offset;
154 u64 cycles; 154 u64 cycles;
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index 807f7e2ce014..12a6d3555cb8 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -770,7 +770,7 @@ void udelay(unsigned long usecs)
770} 770}
771EXPORT_SYMBOL(udelay); 771EXPORT_SYMBOL(udelay);
772 772
773static cycle_t clocksource_tick_read(struct clocksource *cs) 773static u64 clocksource_tick_read(struct clocksource *cs)
774{ 774{
775 return tick_ops->get_tick(); 775 return tick_ops->get_tick();
776} 776}
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 25c23666d592..ba87a27d6715 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -83,7 +83,7 @@ static irqreturn_t um_timer(int irq, void *dev)
83 return IRQ_HANDLED; 83 return IRQ_HANDLED;
84} 84}
85 85
86static cycle_t timer_read(struct clocksource *cs) 86static u64 timer_read(struct clocksource *cs)
87{ 87{
88 return os_nsecs() / TIMER_MULTIPLIER; 88 return os_nsecs() / TIMER_MULTIPLIER;
89} 89}
diff --git a/arch/unicore32/kernel/time.c b/arch/unicore32/kernel/time.c
index ac4c5449bb88..fceaa673f861 100644
--- a/arch/unicore32/kernel/time.c
+++ b/arch/unicore32/kernel/time.c
@@ -62,7 +62,7 @@ static struct clock_event_device ckevt_puv3_osmr0 = {
62 .set_state_oneshot = puv3_osmr0_shutdown, 62 .set_state_oneshot = puv3_osmr0_shutdown,
63}; 63};
64 64
65static cycle_t puv3_read_oscr(struct clocksource *cs) 65static u64 puv3_read_oscr(struct clocksource *cs)
66{ 66{
67 return readl(OST_OSCR); 67 return readl(OST_OSCR);
68} 68}
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c
index 02223cb4bcfd..9d4d6e138311 100644
--- a/arch/x86/entry/vdso/vclock_gettime.c
+++ b/arch/x86/entry/vdso/vclock_gettime.c
@@ -92,10 +92,10 @@ static notrace const struct pvclock_vsyscall_time_info *get_pvti0(void)
92 return (const struct pvclock_vsyscall_time_info *)&pvclock_page; 92 return (const struct pvclock_vsyscall_time_info *)&pvclock_page;
93} 93}
94 94
95static notrace cycle_t vread_pvclock(int *mode) 95static notrace u64 vread_pvclock(int *mode)
96{ 96{
97 const struct pvclock_vcpu_time_info *pvti = &get_pvti0()->pvti; 97 const struct pvclock_vcpu_time_info *pvti = &get_pvti0()->pvti;
98 cycle_t ret; 98 u64 ret;
99 u64 last; 99 u64 last;
100 u32 version; 100 u32 version;
101 101
@@ -142,9 +142,9 @@ static notrace cycle_t vread_pvclock(int *mode)
142} 142}
143#endif 143#endif
144 144
145notrace static cycle_t vread_tsc(void) 145notrace static u64 vread_tsc(void)
146{ 146{
147 cycle_t ret = (cycle_t)rdtsc_ordered(); 147 u64 ret = (u64)rdtsc_ordered();
148 u64 last = gtod->cycle_last; 148 u64 last = gtod->cycle_last;
149 149
150 if (likely(ret >= last)) 150 if (likely(ret >= last))
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 2e25038dbd93..a7066dc1a7e9 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -768,7 +768,7 @@ struct kvm_arch {
768 spinlock_t pvclock_gtod_sync_lock; 768 spinlock_t pvclock_gtod_sync_lock;
769 bool use_master_clock; 769 bool use_master_clock;
770 u64 master_kernel_ns; 770 u64 master_kernel_ns;
771 cycle_t master_cycle_now; 771 u64 master_cycle_now;
772 struct delayed_work kvmclock_update_work; 772 struct delayed_work kvmclock_update_work;
773 struct delayed_work kvmclock_sync_work; 773 struct delayed_work kvmclock_sync_work;
774 774
diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h
index 3ad741b84072..448cfe1b48cf 100644
--- a/arch/x86/include/asm/pvclock.h
+++ b/arch/x86/include/asm/pvclock.h
@@ -14,7 +14,7 @@ static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
14#endif 14#endif
15 15
16/* some helper functions for xen and kvm pv clock sources */ 16/* some helper functions for xen and kvm pv clock sources */
17cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src); 17u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
18u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src); 18u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src);
19void pvclock_set_flags(u8 flags); 19void pvclock_set_flags(u8 flags);
20unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src); 20unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src);
@@ -87,11 +87,10 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
87} 87}
88 88
89static __always_inline 89static __always_inline
90cycle_t __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, 90u64 __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, u64 tsc)
91 u64 tsc)
92{ 91{
93 u64 delta = tsc - src->tsc_timestamp; 92 u64 delta = tsc - src->tsc_timestamp;
94 cycle_t offset = pvclock_scale_delta(delta, src->tsc_to_system_mul, 93 u64 offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
95 src->tsc_shift); 94 src->tsc_shift);
96 return src->system_time + offset; 95 return src->system_time + offset;
97} 96}
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index abb1fdcc545a..f5e6f1c417df 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -29,7 +29,7 @@ static inline cycles_t get_cycles(void)
29 return rdtsc(); 29 return rdtsc();
30} 30}
31 31
32extern struct system_counterval_t convert_art_to_tsc(cycle_t art); 32extern struct system_counterval_t convert_art_to_tsc(u64 art);
33 33
34extern void tsc_init(void); 34extern void tsc_init(void);
35extern void mark_tsc_unstable(char *reason); 35extern void mark_tsc_unstable(char *reason);
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index 3a01996db58f..022e59714562 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -17,8 +17,8 @@ struct vsyscall_gtod_data {
17 unsigned seq; 17 unsigned seq;
18 18
19 int vclock_mode; 19 int vclock_mode;
20 cycle_t cycle_last; 20 u64 cycle_last;
21 cycle_t mask; 21 u64 mask;
22 u32 mult; 22 u32 mult;
23 u32 shift; 23 u32 shift;
24 24
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c
index 456316f6c868..092ea664d2c6 100644
--- a/arch/x86/kernel/apb_timer.c
+++ b/arch/x86/kernel/apb_timer.c
@@ -247,7 +247,7 @@ void apbt_setup_secondary_clock(void) {}
247static int apbt_clocksource_register(void) 247static int apbt_clocksource_register(void)
248{ 248{
249 u64 start, now; 249 u64 start, now;
250 cycle_t t1; 250 u64 t1;
251 251
252 /* Start the counter, use timer 2 as source, timer 0/1 for event */ 252 /* Start the counter, use timer 2 as source, timer 0/1 for event */
253 dw_apb_clocksource_start(clocksource_apbt); 253 dw_apb_clocksource_start(clocksource_apbt);
@@ -355,7 +355,7 @@ unsigned long apbt_quick_calibrate(void)
355{ 355{
356 int i, scale; 356 int i, scale;
357 u64 old, new; 357 u64 old, new;
358 cycle_t t1, t2; 358 u64 t1, t2;
359 unsigned long khz = 0; 359 unsigned long khz = 0;
360 u32 loop, shift; 360 u32 loop, shift;
361 361
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index f37e02e41a77..65e20c97e04b 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -133,9 +133,9 @@ static uint32_t __init ms_hyperv_platform(void)
133 return 0; 133 return 0;
134} 134}
135 135
136static cycle_t read_hv_clock(struct clocksource *arg) 136static u64 read_hv_clock(struct clocksource *arg)
137{ 137{
138 cycle_t current_tick; 138 u64 current_tick;
139 /* 139 /*
140 * Read the partition counter to get the current tick count. This count 140 * Read the partition counter to get the current tick count. This count
141 * is set to 0 when the partition is created and is incremented in 141 * is set to 0 when the partition is created and is incremented in
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 274fab99169d..367756d55980 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -791,7 +791,7 @@ static union hpet_lock hpet __cacheline_aligned = {
791 { .lock = __ARCH_SPIN_LOCK_UNLOCKED, }, 791 { .lock = __ARCH_SPIN_LOCK_UNLOCKED, },
792}; 792};
793 793
794static cycle_t read_hpet(struct clocksource *cs) 794static u64 read_hpet(struct clocksource *cs)
795{ 795{
796 unsigned long flags; 796 unsigned long flags;
797 union hpet_lock old, new; 797 union hpet_lock old, new;
@@ -802,7 +802,7 @@ static cycle_t read_hpet(struct clocksource *cs)
802 * Read HPET directly if in NMI. 802 * Read HPET directly if in NMI.
803 */ 803 */
804 if (in_nmi()) 804 if (in_nmi())
805 return (cycle_t)hpet_readl(HPET_COUNTER); 805 return (u64)hpet_readl(HPET_COUNTER);
806 806
807 /* 807 /*
808 * Read the current state of the lock and HPET value atomically. 808 * Read the current state of the lock and HPET value atomically.
@@ -821,7 +821,7 @@ static cycle_t read_hpet(struct clocksource *cs)
821 WRITE_ONCE(hpet.value, new.value); 821 WRITE_ONCE(hpet.value, new.value);
822 arch_spin_unlock(&hpet.lock); 822 arch_spin_unlock(&hpet.lock);
823 local_irq_restore(flags); 823 local_irq_restore(flags);
824 return (cycle_t)new.value; 824 return (u64)new.value;
825 } 825 }
826 local_irq_restore(flags); 826 local_irq_restore(flags);
827 827
@@ -843,15 +843,15 @@ contended:
843 new.lockval = READ_ONCE(hpet.lockval); 843 new.lockval = READ_ONCE(hpet.lockval);
844 } while ((new.value == old.value) && arch_spin_is_locked(&new.lock)); 844 } while ((new.value == old.value) && arch_spin_is_locked(&new.lock));
845 845
846 return (cycle_t)new.value; 846 return (u64)new.value;
847} 847}
848#else 848#else
849/* 849/*
850 * For UP or 32-bit. 850 * For UP or 32-bit.
851 */ 851 */
852static cycle_t read_hpet(struct clocksource *cs) 852static u64 read_hpet(struct clocksource *cs)
853{ 853{
854 return (cycle_t)hpet_readl(HPET_COUNTER); 854 return (u64)hpet_readl(HPET_COUNTER);
855} 855}
856#endif 856#endif
857 857
@@ -867,7 +867,7 @@ static struct clocksource clocksource_hpet = {
867static int hpet_clocksource_register(void) 867static int hpet_clocksource_register(void)
868{ 868{
869 u64 start, now; 869 u64 start, now;
870 cycle_t t1; 870 u64 t1;
871 871
872 /* Start the counter */ 872 /* Start the counter */
873 hpet_restart_counter(); 873 hpet_restart_counter();
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 60b9949f1e65..2a5cafdf8808 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -32,7 +32,7 @@
32static int kvmclock __ro_after_init = 1; 32static int kvmclock __ro_after_init = 1;
33static int msr_kvm_system_time = MSR_KVM_SYSTEM_TIME; 33static int msr_kvm_system_time = MSR_KVM_SYSTEM_TIME;
34static int msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK; 34static int msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK;
35static cycle_t kvm_sched_clock_offset; 35static u64 kvm_sched_clock_offset;
36 36
37static int parse_no_kvmclock(char *arg) 37static int parse_no_kvmclock(char *arg)
38{ 38{
@@ -79,10 +79,10 @@ static int kvm_set_wallclock(const struct timespec *now)
79 return -1; 79 return -1;
80} 80}
81 81
82static cycle_t kvm_clock_read(void) 82static u64 kvm_clock_read(void)
83{ 83{
84 struct pvclock_vcpu_time_info *src; 84 struct pvclock_vcpu_time_info *src;
85 cycle_t ret; 85 u64 ret;
86 int cpu; 86 int cpu;
87 87
88 preempt_disable_notrace(); 88 preempt_disable_notrace();
@@ -93,12 +93,12 @@ static cycle_t kvm_clock_read(void)
93 return ret; 93 return ret;
94} 94}
95 95
96static cycle_t kvm_clock_get_cycles(struct clocksource *cs) 96static u64 kvm_clock_get_cycles(struct clocksource *cs)
97{ 97{
98 return kvm_clock_read(); 98 return kvm_clock_read();
99} 99}
100 100
101static cycle_t kvm_sched_clock_read(void) 101static u64 kvm_sched_clock_read(void)
102{ 102{
103 return kvm_clock_read() - kvm_sched_clock_offset; 103 return kvm_clock_read() - kvm_sched_clock_offset;
104} 104}
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
index 5b2cc889ce34..9e93fe5803b4 100644
--- a/arch/x86/kernel/pvclock.c
+++ b/arch/x86/kernel/pvclock.c
@@ -71,10 +71,10 @@ u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src)
71 return flags & valid_flags; 71 return flags & valid_flags;
72} 72}
73 73
74cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src) 74u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
75{ 75{
76 unsigned version; 76 unsigned version;
77 cycle_t ret; 77 u64 ret;
78 u64 last; 78 u64 last;
79 u8 flags; 79 u8 flags;
80 80
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 0aed75a1e31b..be3a49ee0356 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1101,9 +1101,9 @@ static void tsc_resume(struct clocksource *cs)
1101 * checking the result of read_tsc() - cycle_last for being negative. 1101 * checking the result of read_tsc() - cycle_last for being negative.
1102 * That works because CLOCKSOURCE_MASK(64) does not mask out any bit. 1102 * That works because CLOCKSOURCE_MASK(64) does not mask out any bit.
1103 */ 1103 */
1104static cycle_t read_tsc(struct clocksource *cs) 1104static u64 read_tsc(struct clocksource *cs)
1105{ 1105{
1106 return (cycle_t)rdtsc_ordered(); 1106 return (u64)rdtsc_ordered();
1107} 1107}
1108 1108
1109/* 1109/*
@@ -1192,7 +1192,7 @@ int unsynchronized_tsc(void)
1192/* 1192/*
1193 * Convert ART to TSC given numerator/denominator found in detect_art() 1193 * Convert ART to TSC given numerator/denominator found in detect_art()
1194 */ 1194 */
1195struct system_counterval_t convert_art_to_tsc(cycle_t art) 1195struct system_counterval_t convert_art_to_tsc(u64 art)
1196{ 1196{
1197 u64 tmp, res, rem; 1197 u64 tmp, res, rem;
1198 1198
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 445c51b6cf6d..ed04398f52c1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1131,8 +1131,8 @@ struct pvclock_gtod_data {
1131 1131
1132 struct { /* extract of a clocksource struct */ 1132 struct { /* extract of a clocksource struct */
1133 int vclock_mode; 1133 int vclock_mode;
1134 cycle_t cycle_last; 1134 u64 cycle_last;
1135 cycle_t mask; 1135 u64 mask;
1136 u32 mult; 1136 u32 mult;
1137 u32 shift; 1137 u32 shift;
1138 } clock; 1138 } clock;
@@ -1572,9 +1572,9 @@ static inline void adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment)
1572 1572
1573#ifdef CONFIG_X86_64 1573#ifdef CONFIG_X86_64
1574 1574
1575static cycle_t read_tsc(void) 1575static u64 read_tsc(void)
1576{ 1576{
1577 cycle_t ret = (cycle_t)rdtsc_ordered(); 1577 u64 ret = (u64)rdtsc_ordered();
1578 u64 last = pvclock_gtod_data.clock.cycle_last; 1578 u64 last = pvclock_gtod_data.clock.cycle_last;
1579 1579
1580 if (likely(ret >= last)) 1580 if (likely(ret >= last))
@@ -1592,7 +1592,7 @@ static cycle_t read_tsc(void)
1592 return last; 1592 return last;
1593} 1593}
1594 1594
1595static inline u64 vgettsc(cycle_t *cycle_now) 1595static inline u64 vgettsc(u64 *cycle_now)
1596{ 1596{
1597 long v; 1597 long v;
1598 struct pvclock_gtod_data *gtod = &pvclock_gtod_data; 1598 struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
@@ -1603,7 +1603,7 @@ static inline u64 vgettsc(cycle_t *cycle_now)
1603 return v * gtod->clock.mult; 1603 return v * gtod->clock.mult;
1604} 1604}
1605 1605
1606static int do_monotonic_boot(s64 *t, cycle_t *cycle_now) 1606static int do_monotonic_boot(s64 *t, u64 *cycle_now)
1607{ 1607{
1608 struct pvclock_gtod_data *gtod = &pvclock_gtod_data; 1608 struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
1609 unsigned long seq; 1609 unsigned long seq;
@@ -1624,7 +1624,7 @@ static int do_monotonic_boot(s64 *t, cycle_t *cycle_now)
1624} 1624}
1625 1625
1626/* returns true if host is using tsc clocksource */ 1626/* returns true if host is using tsc clocksource */
1627static bool kvm_get_time_and_clockread(s64 *kernel_ns, cycle_t *cycle_now) 1627static bool kvm_get_time_and_clockread(s64 *kernel_ns, u64 *cycle_now)
1628{ 1628{
1629 /* checked again under seqlock below */ 1629 /* checked again under seqlock below */
1630 if (pvclock_gtod_data.clock.vclock_mode != VCLOCK_TSC) 1630 if (pvclock_gtod_data.clock.vclock_mode != VCLOCK_TSC)
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 4ca0d78adcf0..d3289d7e78fa 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -916,7 +916,7 @@ static unsigned long lguest_tsc_khz(void)
916 * If we can't use the TSC, the kernel falls back to our lower-priority 916 * If we can't use the TSC, the kernel falls back to our lower-priority
917 * "lguest_clock", where we read the time value given to us by the Host. 917 * "lguest_clock", where we read the time value given to us by the Host.
918 */ 918 */
919static cycle_t lguest_clock_read(struct clocksource *cs) 919static u64 lguest_clock_read(struct clocksource *cs)
920{ 920{
921 unsigned long sec, nsec; 921 unsigned long sec, nsec;
922 922
diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index b333fc45f9ec..2ee7632d4916 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -30,7 +30,7 @@
30 30
31#define RTC_NAME "sgi_rtc" 31#define RTC_NAME "sgi_rtc"
32 32
33static cycle_t uv_read_rtc(struct clocksource *cs); 33static u64 uv_read_rtc(struct clocksource *cs);
34static int uv_rtc_next_event(unsigned long, struct clock_event_device *); 34static int uv_rtc_next_event(unsigned long, struct clock_event_device *);
35static int uv_rtc_shutdown(struct clock_event_device *evt); 35static int uv_rtc_shutdown(struct clock_event_device *evt);
36 36
@@ -38,7 +38,7 @@ static struct clocksource clocksource_uv = {
38 .name = RTC_NAME, 38 .name = RTC_NAME,
39 .rating = 299, 39 .rating = 299,
40 .read = uv_read_rtc, 40 .read = uv_read_rtc,
41 .mask = (cycle_t)UVH_RTC_REAL_TIME_CLOCK_MASK, 41 .mask = (u64)UVH_RTC_REAL_TIME_CLOCK_MASK,
42 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 42 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
43}; 43};
44 44
@@ -296,7 +296,7 @@ static int uv_rtc_unset_timer(int cpu, int force)
296 * cachelines of it's own page. This allows faster simultaneous reads 296 * cachelines of it's own page. This allows faster simultaneous reads
297 * from a given socket. 297 * from a given socket.
298 */ 298 */
299static cycle_t uv_read_rtc(struct clocksource *cs) 299static u64 uv_read_rtc(struct clocksource *cs)
300{ 300{
301 unsigned long offset; 301 unsigned long offset;
302 302
@@ -305,7 +305,7 @@ static cycle_t uv_read_rtc(struct clocksource *cs)
305 else 305 else
306 offset = (uv_blade_processor_id() * L1_CACHE_BYTES) % PAGE_SIZE; 306 offset = (uv_blade_processor_id() * L1_CACHE_BYTES) % PAGE_SIZE;
307 307
308 return (cycle_t)uv_read_local_mmr(UVH_RTC | offset); 308 return (u64)uv_read_local_mmr(UVH_RTC | offset);
309} 309}
310 310
311/* 311/*
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 33d8f6a7829d..1e69956d7852 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -39,10 +39,10 @@ static unsigned long xen_tsc_khz(void)
39 return pvclock_tsc_khz(info); 39 return pvclock_tsc_khz(info);
40} 40}
41 41
42cycle_t xen_clocksource_read(void) 42u64 xen_clocksource_read(void)
43{ 43{
44 struct pvclock_vcpu_time_info *src; 44 struct pvclock_vcpu_time_info *src;
45 cycle_t ret; 45 u64 ret;
46 46
47 preempt_disable_notrace(); 47 preempt_disable_notrace();
48 src = &__this_cpu_read(xen_vcpu)->time; 48 src = &__this_cpu_read(xen_vcpu)->time;
@@ -51,7 +51,7 @@ cycle_t xen_clocksource_read(void)
51 return ret; 51 return ret;
52} 52}
53 53
54static cycle_t xen_clocksource_get_cycles(struct clocksource *cs) 54static u64 xen_clocksource_get_cycles(struct clocksource *cs)
55{ 55{
56 return xen_clocksource_read(); 56 return xen_clocksource_read();
57} 57}
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 3cbce3b085e7..ac0a2b0f9e62 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -67,7 +67,7 @@ void xen_init_irq_ops(void);
67void xen_setup_timer(int cpu); 67void xen_setup_timer(int cpu);
68void xen_setup_runstate_info(int cpu); 68void xen_setup_runstate_info(int cpu);
69void xen_teardown_timer(int cpu); 69void xen_teardown_timer(int cpu);
70cycle_t xen_clocksource_read(void); 70u64 xen_clocksource_read(void);
71void xen_setup_cpu_clockevents(void); 71void xen_setup_cpu_clockevents(void);
72void __init xen_init_time_ops(void); 72void __init xen_init_time_ops(void);
73void __init xen_hvm_init_time_ops(void); 73void __init xen_hvm_init_time_ops(void);
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index be81e69b25bc..668c1056f9e4 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -34,9 +34,9 @@
34unsigned long ccount_freq; /* ccount Hz */ 34unsigned long ccount_freq; /* ccount Hz */
35EXPORT_SYMBOL(ccount_freq); 35EXPORT_SYMBOL(ccount_freq);
36 36
37static cycle_t ccount_read(struct clocksource *cs) 37static u64 ccount_read(struct clocksource *cs)
38{ 38{
39 return (cycle_t)get_ccount(); 39 return (u64)get_ccount();
40} 40}
41 41
42static u64 notrace ccount_sched_clock_read(void) 42static u64 notrace ccount_sched_clock_read(void)
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index be54e5331a45..20b32bb8c2af 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -69,9 +69,9 @@ static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
69#ifdef CONFIG_IA64 69#ifdef CONFIG_IA64
70static void __iomem *hpet_mctr; 70static void __iomem *hpet_mctr;
71 71
72static cycle_t read_hpet(struct clocksource *cs) 72static u64 read_hpet(struct clocksource *cs)
73{ 73{
74 return (cycle_t)read_counter((void __iomem *)hpet_mctr); 74 return (u64)read_counter((void __iomem *)hpet_mctr);
75} 75}
76 76
77static struct clocksource clocksource_hpet = { 77static struct clocksource clocksource_hpet = {
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 28037d0b8dcd..1961e3539b57 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -58,16 +58,16 @@ u32 acpi_pm_read_verified(void)
58 return v2; 58 return v2;
59} 59}
60 60
61static cycle_t acpi_pm_read(struct clocksource *cs) 61static u64 acpi_pm_read(struct clocksource *cs)
62{ 62{
63 return (cycle_t)read_pmtmr(); 63 return (u64)read_pmtmr();
64} 64}
65 65
66static struct clocksource clocksource_acpi_pm = { 66static struct clocksource clocksource_acpi_pm = {
67 .name = "acpi_pm", 67 .name = "acpi_pm",
68 .rating = 200, 68 .rating = 200,
69 .read = acpi_pm_read, 69 .read = acpi_pm_read,
70 .mask = (cycle_t)ACPI_PM_MASK, 70 .mask = (u64)ACPI_PM_MASK,
71 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 71 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
72}; 72};
73 73
@@ -81,9 +81,9 @@ static int __init acpi_pm_good_setup(char *__str)
81} 81}
82__setup("acpi_pm_good", acpi_pm_good_setup); 82__setup("acpi_pm_good", acpi_pm_good_setup);
83 83
84static cycle_t acpi_pm_read_slow(struct clocksource *cs) 84static u64 acpi_pm_read_slow(struct clocksource *cs)
85{ 85{
86 return (cycle_t)acpi_pm_read_verified(); 86 return (u64)acpi_pm_read_verified();
87} 87}
88 88
89static inline void acpi_pm_need_workaround(void) 89static inline void acpi_pm_need_workaround(void)
@@ -145,7 +145,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE,
145 */ 145 */
146static int verify_pmtmr_rate(void) 146static int verify_pmtmr_rate(void)
147{ 147{
148 cycle_t value1, value2; 148 u64 value1, value2;
149 unsigned long count, delta; 149 unsigned long count, delta;
150 150
151 mach_prepare_counter(); 151 mach_prepare_counter();
@@ -175,7 +175,7 @@ static int verify_pmtmr_rate(void)
175 175
176static int __init init_acpi_pm_clocksource(void) 176static int __init init_acpi_pm_clocksource(void)
177{ 177{
178 cycle_t value1, value2; 178 u64 value1, value2;
179 unsigned int i, j = 0; 179 unsigned int i, j = 0;
180 180
181 if (!pmtmr_ioport) 181 if (!pmtmr_ioport)
diff --git a/drivers/clocksource/arc_timer.c b/drivers/clocksource/arc_timer.c
index a49748d826c0..3ea46343024f 100644
--- a/drivers/clocksource/arc_timer.c
+++ b/drivers/clocksource/arc_timer.c
@@ -56,7 +56,7 @@ static int noinline arc_get_timer_clk(struct device_node *node)
56 56
57#ifdef CONFIG_ARC_TIMERS_64BIT 57#ifdef CONFIG_ARC_TIMERS_64BIT
58 58
59static cycle_t arc_read_gfrc(struct clocksource *cs) 59static u64 arc_read_gfrc(struct clocksource *cs)
60{ 60{
61 unsigned long flags; 61 unsigned long flags;
62 u32 l, h; 62 u32 l, h;
@@ -71,7 +71,7 @@ static cycle_t arc_read_gfrc(struct clocksource *cs)
71 71
72 local_irq_restore(flags); 72 local_irq_restore(flags);
73 73
74 return (((cycle_t)h) << 32) | l; 74 return (((u64)h) << 32) | l;
75} 75}
76 76
77static struct clocksource arc_counter_gfrc = { 77static struct clocksource arc_counter_gfrc = {
@@ -105,7 +105,7 @@ CLOCKSOURCE_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);
105#define AUX_RTC_LOW 0x104 105#define AUX_RTC_LOW 0x104
106#define AUX_RTC_HIGH 0x105 106#define AUX_RTC_HIGH 0x105
107 107
108static cycle_t arc_read_rtc(struct clocksource *cs) 108static u64 arc_read_rtc(struct clocksource *cs)
109{ 109{
110 unsigned long status; 110 unsigned long status;
111 u32 l, h; 111 u32 l, h;
@@ -122,7 +122,7 @@ static cycle_t arc_read_rtc(struct clocksource *cs)
122 status = read_aux_reg(AUX_RTC_CTRL); 122 status = read_aux_reg(AUX_RTC_CTRL);
123 } while (!(status & _BITUL(31))); 123 } while (!(status & _BITUL(31)));
124 124
125 return (((cycle_t)h) << 32) | l; 125 return (((u64)h) << 32) | l;
126} 126}
127 127
128static struct clocksource arc_counter_rtc = { 128static struct clocksource arc_counter_rtc = {
@@ -166,9 +166,9 @@ CLOCKSOURCE_OF_DECLARE(arc_rtc, "snps,archs-timer-rtc", arc_cs_setup_rtc);
166 * 32bit TIMER1 to keep counting monotonically and wraparound 166 * 32bit TIMER1 to keep counting monotonically and wraparound
167 */ 167 */
168 168
169static cycle_t arc_read_timer1(struct clocksource *cs) 169static u64 arc_read_timer1(struct clocksource *cs)
170{ 170{
171 return (cycle_t) read_aux_reg(ARC_REG_TIMER1_CNT); 171 return (u64) read_aux_reg(ARC_REG_TIMER1_CNT);
172} 172}
173 173
174static struct clocksource arc_counter_timer1 = { 174static struct clocksource arc_counter_timer1 = {
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 02fef6830e72..394e417414d3 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -562,12 +562,12 @@ static u64 arch_counter_get_cntvct_mem(void)
562 */ 562 */
563u64 (*arch_timer_read_counter)(void) = arch_counter_get_cntvct; 563u64 (*arch_timer_read_counter)(void) = arch_counter_get_cntvct;
564 564
565static cycle_t arch_counter_read(struct clocksource *cs) 565static u64 arch_counter_read(struct clocksource *cs)
566{ 566{
567 return arch_timer_read_counter(); 567 return arch_timer_read_counter();
568} 568}
569 569
570static cycle_t arch_counter_read_cc(const struct cyclecounter *cc) 570static u64 arch_counter_read_cc(const struct cyclecounter *cc)
571{ 571{
572 return arch_timer_read_counter(); 572 return arch_timer_read_counter();
573} 573}
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
index 8da03298f844..570cc58baec4 100644
--- a/drivers/clocksource/arm_global_timer.c
+++ b/drivers/clocksource/arm_global_timer.c
@@ -195,7 +195,7 @@ static int gt_dying_cpu(unsigned int cpu)
195 return 0; 195 return 0;
196} 196}
197 197
198static cycle_t gt_clocksource_read(struct clocksource *cs) 198static u64 gt_clocksource_read(struct clocksource *cs)
199{ 199{
200 return gt_counter_read(); 200 return gt_counter_read();
201} 201}
diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
index fbfbdec13b08..44e5e951583b 100644
--- a/drivers/clocksource/cadence_ttc_timer.c
+++ b/drivers/clocksource/cadence_ttc_timer.c
@@ -158,11 +158,11 @@ static irqreturn_t ttc_clock_event_interrupt(int irq, void *dev_id)
158 * 158 *
159 * returns: Current timer counter register value 159 * returns: Current timer counter register value
160 **/ 160 **/
161static cycle_t __ttc_clocksource_read(struct clocksource *cs) 161static u64 __ttc_clocksource_read(struct clocksource *cs)
162{ 162{
163 struct ttc_timer *timer = &to_ttc_timer_clksrc(cs)->ttc; 163 struct ttc_timer *timer = &to_ttc_timer_clksrc(cs)->ttc;
164 164
165 return (cycle_t)readl_relaxed(timer->base_addr + 165 return (u64)readl_relaxed(timer->base_addr +
166 TTC_COUNT_VAL_OFFSET); 166 TTC_COUNT_VAL_OFFSET);
167} 167}
168 168
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c
index 77a365f573d7..c69e2772658d 100644
--- a/drivers/clocksource/clksrc-dbx500-prcmu.c
+++ b/drivers/clocksource/clksrc-dbx500-prcmu.c
@@ -30,7 +30,7 @@
30 30
31static void __iomem *clksrc_dbx500_timer_base; 31static void __iomem *clksrc_dbx500_timer_base;
32 32
33static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs) 33static u64 notrace clksrc_dbx500_prcmu_read(struct clocksource *cs)
34{ 34{
35 void __iomem *base = clksrc_dbx500_timer_base; 35 void __iomem *base = clksrc_dbx500_timer_base;
36 u32 count, count2; 36 u32 count, count2;
diff --git a/drivers/clocksource/dw_apb_timer.c b/drivers/clocksource/dw_apb_timer.c
index 797505aa2ba4..63e4f5519577 100644
--- a/drivers/clocksource/dw_apb_timer.c
+++ b/drivers/clocksource/dw_apb_timer.c
@@ -348,7 +348,7 @@ void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs)
348 dw_apb_clocksource_read(dw_cs); 348 dw_apb_clocksource_read(dw_cs);
349} 349}
350 350
351static cycle_t __apbt_read_clocksource(struct clocksource *cs) 351static u64 __apbt_read_clocksource(struct clocksource *cs)
352{ 352{
353 u32 current_count; 353 u32 current_count;
354 struct dw_apb_clocksource *dw_cs = 354 struct dw_apb_clocksource *dw_cs =
@@ -357,7 +357,7 @@ static cycle_t __apbt_read_clocksource(struct clocksource *cs)
357 current_count = apbt_readl_relaxed(&dw_cs->timer, 357 current_count = apbt_readl_relaxed(&dw_cs->timer,
358 APBTMR_N_CURRENT_VALUE); 358 APBTMR_N_CURRENT_VALUE);
359 359
360 return (cycle_t)~current_count; 360 return (u64)~current_count;
361} 361}
362 362
363static void apbt_restart_clocksource(struct clocksource *cs) 363static void apbt_restart_clocksource(struct clocksource *cs)
@@ -416,7 +416,7 @@ void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs)
416 * 416 *
417 * @dw_cs: The clocksource to read. 417 * @dw_cs: The clocksource to read.
418 */ 418 */
419cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs) 419u64 dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs)
420{ 420{
421 return (cycle_t)~apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE); 421 return (u64)~apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE);
422} 422}
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c
index 19bb1792d647..aff87df07449 100644
--- a/drivers/clocksource/em_sti.c
+++ b/drivers/clocksource/em_sti.c
@@ -110,9 +110,9 @@ static void em_sti_disable(struct em_sti_priv *p)
110 clk_disable_unprepare(p->clk); 110 clk_disable_unprepare(p->clk);
111} 111}
112 112
113static cycle_t em_sti_count(struct em_sti_priv *p) 113static u64 em_sti_count(struct em_sti_priv *p)
114{ 114{
115 cycle_t ticks; 115 u64 ticks;
116 unsigned long flags; 116 unsigned long flags;
117 117
118 /* the STI hardware buffers the 48-bit count, but to 118 /* the STI hardware buffers the 48-bit count, but to
@@ -121,14 +121,14 @@ static cycle_t em_sti_count(struct em_sti_priv *p)
121 * Always read STI_COUNT_H before STI_COUNT_L. 121 * Always read STI_COUNT_H before STI_COUNT_L.
122 */ 122 */
123 raw_spin_lock_irqsave(&p->lock, flags); 123 raw_spin_lock_irqsave(&p->lock, flags);
124 ticks = (cycle_t)(em_sti_read(p, STI_COUNT_H) & 0xffff) << 32; 124 ticks = (u64)(em_sti_read(p, STI_COUNT_H) & 0xffff) << 32;
125 ticks |= em_sti_read(p, STI_COUNT_L); 125 ticks |= em_sti_read(p, STI_COUNT_L);
126 raw_spin_unlock_irqrestore(&p->lock, flags); 126 raw_spin_unlock_irqrestore(&p->lock, flags);
127 127
128 return ticks; 128 return ticks;
129} 129}
130 130
131static cycle_t em_sti_set_next(struct em_sti_priv *p, cycle_t next) 131static u64 em_sti_set_next(struct em_sti_priv *p, u64 next)
132{ 132{
133 unsigned long flags; 133 unsigned long flags;
134 134
@@ -198,7 +198,7 @@ static struct em_sti_priv *cs_to_em_sti(struct clocksource *cs)
198 return container_of(cs, struct em_sti_priv, cs); 198 return container_of(cs, struct em_sti_priv, cs);
199} 199}
200 200
201static cycle_t em_sti_clocksource_read(struct clocksource *cs) 201static u64 em_sti_clocksource_read(struct clocksource *cs)
202{ 202{
203 return em_sti_count(cs_to_em_sti(cs)); 203 return em_sti_count(cs_to_em_sti(cs));
204} 204}
@@ -271,7 +271,7 @@ static int em_sti_clock_event_next(unsigned long delta,
271 struct clock_event_device *ced) 271 struct clock_event_device *ced)
272{ 272{
273 struct em_sti_priv *p = ced_to_em_sti(ced); 273 struct em_sti_priv *p = ced_to_em_sti(ced);
274 cycle_t next; 274 u64 next;
275 int safe; 275 int safe;
276 276
277 next = em_sti_set_next(p, em_sti_count(p) + delta); 277 next = em_sti_set_next(p, em_sti_count(p) + delta);
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 8f3488b80896..c8b9f834f4de 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -183,7 +183,7 @@ static u64 exynos4_read_count_64(void)
183 hi2 = readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_U); 183 hi2 = readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_U);
184 } while (hi != hi2); 184 } while (hi != hi2);
185 185
186 return ((cycle_t)hi << 32) | lo; 186 return ((u64)hi << 32) | lo;
187} 187}
188 188
189/** 189/**
@@ -199,7 +199,7 @@ static u32 notrace exynos4_read_count_32(void)
199 return readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_L); 199 return readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_L);
200} 200}
201 201
202static cycle_t exynos4_frc_read(struct clocksource *cs) 202static u64 exynos4_frc_read(struct clocksource *cs)
203{ 203{
204 return exynos4_read_count_32(); 204 return exynos4_read_count_32();
205} 205}
@@ -266,7 +266,7 @@ static void exynos4_mct_comp0_stop(void)
266static void exynos4_mct_comp0_start(bool periodic, unsigned long cycles) 266static void exynos4_mct_comp0_start(bool periodic, unsigned long cycles)
267{ 267{
268 unsigned int tcon; 268 unsigned int tcon;
269 cycle_t comp_cycle; 269 u64 comp_cycle;
270 270
271 tcon = readl_relaxed(reg_base + EXYNOS4_MCT_G_TCON); 271 tcon = readl_relaxed(reg_base + EXYNOS4_MCT_G_TCON);
272 272
diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index 07d9d5be9054..5b27fb9997c2 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -72,7 +72,7 @@ static inline struct timer16_priv *cs_to_priv(struct clocksource *cs)
72 return container_of(cs, struct timer16_priv, cs); 72 return container_of(cs, struct timer16_priv, cs);
73} 73}
74 74
75static cycle_t timer16_clocksource_read(struct clocksource *cs) 75static u64 timer16_clocksource_read(struct clocksource *cs)
76{ 76{
77 struct timer16_priv *p = cs_to_priv(cs); 77 struct timer16_priv *p = cs_to_priv(cs);
78 unsigned long raw, value; 78 unsigned long raw, value;
diff --git a/drivers/clocksource/h8300_tpu.c b/drivers/clocksource/h8300_tpu.c
index 7bdf1991c847..72e1cf2b3096 100644
--- a/drivers/clocksource/h8300_tpu.c
+++ b/drivers/clocksource/h8300_tpu.c
@@ -64,7 +64,7 @@ static inline struct tpu_priv *cs_to_priv(struct clocksource *cs)
64 return container_of(cs, struct tpu_priv, cs); 64 return container_of(cs, struct tpu_priv, cs);
65} 65}
66 66
67static cycle_t tpu_clocksource_read(struct clocksource *cs) 67static u64 tpu_clocksource_read(struct clocksource *cs)
68{ 68{
69 struct tpu_priv *p = cs_to_priv(cs); 69 struct tpu_priv *p = cs_to_priv(cs);
70 unsigned long flags; 70 unsigned long flags;
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c
index 0efd36e483ab..64f6490740d7 100644
--- a/drivers/clocksource/i8253.c
+++ b/drivers/clocksource/i8253.c
@@ -25,7 +25,7 @@ EXPORT_SYMBOL(i8253_lock);
25 * to just read by itself. So use jiffies to emulate a free 25 * to just read by itself. So use jiffies to emulate a free
26 * running counter: 26 * running counter:
27 */ 27 */
28static cycle_t i8253_read(struct clocksource *cs) 28static u64 i8253_read(struct clocksource *cs)
29{ 29{
30 static int old_count; 30 static int old_count;
31 static u32 old_jifs; 31 static u32 old_jifs;
@@ -83,7 +83,7 @@ static cycle_t i8253_read(struct clocksource *cs)
83 83
84 count = (PIT_LATCH - 1) - count; 84 count = (PIT_LATCH - 1) - count;
85 85
86 return (cycle_t)(jifs * PIT_LATCH) + count; 86 return (u64)(jifs * PIT_LATCH) + count;
87} 87}
88 88
89static struct clocksource i8253_cs = { 89static struct clocksource i8253_cs = {
diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c
index 54e1665aa03c..e90a6cfcb061 100644
--- a/drivers/clocksource/jcore-pit.c
+++ b/drivers/clocksource/jcore-pit.c
@@ -57,7 +57,7 @@ static notrace u64 jcore_sched_clock_read(void)
57 return seclo * NSEC_PER_SEC + nsec; 57 return seclo * NSEC_PER_SEC + nsec;
58} 58}
59 59
60static cycle_t jcore_clocksource_read(struct clocksource *cs) 60static u64 jcore_clocksource_read(struct clocksource *cs)
61{ 61{
62 return jcore_sched_clock_read(); 62 return jcore_sched_clock_read();
63} 63}
diff --git a/drivers/clocksource/metag_generic.c b/drivers/clocksource/metag_generic.c
index a80ab3e446b7..8d06a0f7ff26 100644
--- a/drivers/clocksource/metag_generic.c
+++ b/drivers/clocksource/metag_generic.c
@@ -56,7 +56,7 @@ static int metag_timer_set_next_event(unsigned long delta,
56 return 0; 56 return 0;
57} 57}
58 58
59static cycle_t metag_clocksource_read(struct clocksource *cs) 59static u64 metag_clocksource_read(struct clocksource *cs)
60{ 60{
61 return __core_reg_get(TXTIMER); 61 return __core_reg_get(TXTIMER);
62} 62}
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index 7a960cd01104..7b86d07c99b4 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -125,7 +125,7 @@ static int gic_clockevent_init(void)
125 return 0; 125 return 0;
126} 126}
127 127
128static cycle_t gic_hpt_read(struct clocksource *cs) 128static u64 gic_hpt_read(struct clocksource *cs)
129{ 129{
130 return gic_read_count(); 130 return gic_read_count();
131} 131}
diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
index c4f7d7a9b689..4c4df981d8cc 100644
--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -20,24 +20,24 @@ static inline struct clocksource_mmio *to_mmio_clksrc(struct clocksource *c)
20 return container_of(c, struct clocksource_mmio, clksrc); 20 return container_of(c, struct clocksource_mmio, clksrc);
21} 21}
22 22
23cycle_t clocksource_mmio_readl_up(struct clocksource *c) 23u64 clocksource_mmio_readl_up(struct clocksource *c)
24{ 24{
25 return (cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg); 25 return (u64)readl_relaxed(to_mmio_clksrc(c)->reg);
26} 26}
27 27
28cycle_t clocksource_mmio_readl_down(struct clocksource *c) 28u64 clocksource_mmio_readl_down(struct clocksource *c)
29{ 29{
30 return ~(cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; 30 return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
31} 31}
32 32
33cycle_t clocksource_mmio_readw_up(struct clocksource *c) 33u64 clocksource_mmio_readw_up(struct clocksource *c)
34{ 34{
35 return (cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg); 35 return (u64)readw_relaxed(to_mmio_clksrc(c)->reg);
36} 36}
37 37
38cycle_t clocksource_mmio_readw_down(struct clocksource *c) 38u64 clocksource_mmio_readw_down(struct clocksource *c)
39{ 39{
40 return ~(cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask; 40 return ~(u64)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
41} 41}
42 42
43/** 43/**
@@ -51,7 +51,7 @@ cycle_t clocksource_mmio_readw_down(struct clocksource *c)
51 */ 51 */
52int __init clocksource_mmio_init(void __iomem *base, const char *name, 52int __init clocksource_mmio_init(void __iomem *base, const char *name,
53 unsigned long hz, int rating, unsigned bits, 53 unsigned long hz, int rating, unsigned bits,
54 cycle_t (*read)(struct clocksource *)) 54 u64 (*read)(struct clocksource *))
55{ 55{
56 struct clocksource_mmio *cs; 56 struct clocksource_mmio *cs;
57 57
diff --git a/drivers/clocksource/mxs_timer.c b/drivers/clocksource/mxs_timer.c
index 0ba0a913b41d..99b77aff0839 100644
--- a/drivers/clocksource/mxs_timer.c
+++ b/drivers/clocksource/mxs_timer.c
@@ -97,7 +97,7 @@ static void timrot_irq_acknowledge(void)
97 HW_TIMROT_TIMCTRLn(0) + STMP_OFFSET_REG_CLR); 97 HW_TIMROT_TIMCTRLn(0) + STMP_OFFSET_REG_CLR);
98} 98}
99 99
100static cycle_t timrotv1_get_cycles(struct clocksource *cs) 100static u64 timrotv1_get_cycles(struct clocksource *cs)
101{ 101{
102 return ~((__raw_readl(mxs_timrot_base + HW_TIMROT_TIMCOUNTn(1)) 102 return ~((__raw_readl(mxs_timrot_base + HW_TIMROT_TIMCOUNTn(1))
103 & 0xffff0000) >> 16); 103 & 0xffff0000) >> 16);
diff --git a/drivers/clocksource/qcom-timer.c b/drivers/clocksource/qcom-timer.c
index 3283cfa2aa52..d5d048d890d4 100644
--- a/drivers/clocksource/qcom-timer.c
+++ b/drivers/clocksource/qcom-timer.c
@@ -89,7 +89,7 @@ static struct clock_event_device __percpu *msm_evt;
89 89
90static void __iomem *source_base; 90static void __iomem *source_base;
91 91
92static notrace cycle_t msm_read_timer_count(struct clocksource *cs) 92static notrace u64 msm_read_timer_count(struct clocksource *cs)
93{ 93{
94 return readl_relaxed(source_base + TIMER_COUNT_VAL); 94 return readl_relaxed(source_base + TIMER_COUNT_VAL);
95} 95}
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 54565bd0093b..0093ece661fe 100644
--- a/drivers/clocksource/samsung_pwm_timer.c
+++ b/drivers/clocksource/samsung_pwm_timer.c
@@ -307,7 +307,7 @@ static void samsung_clocksource_resume(struct clocksource *cs)
307 samsung_time_start(pwm.source_id, true); 307 samsung_time_start(pwm.source_id, true);
308} 308}
309 309
310static cycle_t notrace samsung_clocksource_read(struct clocksource *c) 310static u64 notrace samsung_clocksource_read(struct clocksource *c)
311{ 311{
312 return ~readl_relaxed(pwm.source_reg); 312 return ~readl_relaxed(pwm.source_reg);
313} 313}
diff --git a/drivers/clocksource/scx200_hrt.c b/drivers/clocksource/scx200_hrt.c
index 64f9e8294434..a46660bf6588 100644
--- a/drivers/clocksource/scx200_hrt.c
+++ b/drivers/clocksource/scx200_hrt.c
@@ -43,10 +43,10 @@ MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)");
43/* The base timer frequency, * 27 if selected */ 43/* The base timer frequency, * 27 if selected */
44#define HRT_FREQ 1000000 44#define HRT_FREQ 1000000
45 45
46static cycle_t read_hrt(struct clocksource *cs) 46static u64 read_hrt(struct clocksource *cs)
47{ 47{
48 /* Read the timer value */ 48 /* Read the timer value */
49 return (cycle_t) inl(scx200_cb_base + SCx200_TIMER_OFFSET); 49 return (u64) inl(scx200_cb_base + SCx200_TIMER_OFFSET);
50} 50}
51 51
52static struct clocksource cs_hrt = { 52static struct clocksource cs_hrt = {
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 103c49362c68..28757edf6aca 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -612,7 +612,7 @@ static struct sh_cmt_channel *cs_to_sh_cmt(struct clocksource *cs)
612 return container_of(cs, struct sh_cmt_channel, cs); 612 return container_of(cs, struct sh_cmt_channel, cs);
613} 613}
614 614
615static cycle_t sh_cmt_clocksource_read(struct clocksource *cs) 615static u64 sh_cmt_clocksource_read(struct clocksource *cs)
616{ 616{
617 struct sh_cmt_channel *ch = cs_to_sh_cmt(cs); 617 struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
618 unsigned long flags, raw; 618 unsigned long flags, raw;
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 469e776ec17a..1fbf2aadcfd4 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -255,7 +255,7 @@ static struct sh_tmu_channel *cs_to_sh_tmu(struct clocksource *cs)
255 return container_of(cs, struct sh_tmu_channel, cs); 255 return container_of(cs, struct sh_tmu_channel, cs);
256} 256}
257 257
258static cycle_t sh_tmu_clocksource_read(struct clocksource *cs) 258static u64 sh_tmu_clocksource_read(struct clocksource *cs)
259{ 259{
260 struct sh_tmu_channel *ch = cs_to_sh_tmu(cs); 260 struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
261 261
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 4da2af9694a2..d4ca9962a759 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -41,7 +41,7 @@
41 41
42static void __iomem *tcaddr; 42static void __iomem *tcaddr;
43 43
44static cycle_t tc_get_cycles(struct clocksource *cs) 44static u64 tc_get_cycles(struct clocksource *cs)
45{ 45{
46 unsigned long flags; 46 unsigned long flags;
47 u32 lower, upper; 47 u32 lower, upper;
@@ -56,7 +56,7 @@ static cycle_t tc_get_cycles(struct clocksource *cs)
56 return (upper << 16) | lower; 56 return (upper << 16) | lower;
57} 57}
58 58
59static cycle_t tc_get_cycles32(struct clocksource *cs) 59static u64 tc_get_cycles32(struct clocksource *cs)
60{ 60{
61 return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); 61 return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
62} 62}
diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c
index a8e6c7df853d..3710e4d9dcba 100644
--- a/drivers/clocksource/time-pistachio.c
+++ b/drivers/clocksource/time-pistachio.c
@@ -67,7 +67,7 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset,
67 writel(value, base + 0x20 * gpt_id + offset); 67 writel(value, base + 0x20 * gpt_id + offset);
68} 68}
69 69
70static cycle_t notrace 70static u64 notrace
71pistachio_clocksource_read_cycles(struct clocksource *cs) 71pistachio_clocksource_read_cycles(struct clocksource *cs)
72{ 72{
73 struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs); 73 struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
@@ -84,7 +84,7 @@ pistachio_clocksource_read_cycles(struct clocksource *cs)
84 counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0); 84 counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0);
85 raw_spin_unlock_irqrestore(&pcs->lock, flags); 85 raw_spin_unlock_irqrestore(&pcs->lock, flags);
86 86
87 return (cycle_t)~counter; 87 return (u64)~counter;
88} 88}
89 89
90static u64 notrace pistachio_read_sched_clock(void) 90static u64 notrace pistachio_read_sched_clock(void)
diff --git a/drivers/clocksource/timer-atlas7.c b/drivers/clocksource/timer-atlas7.c
index 4334e0330ada..db0f21e7d7d2 100644
--- a/drivers/clocksource/timer-atlas7.c
+++ b/drivers/clocksource/timer-atlas7.c
@@ -85,7 +85,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
85} 85}
86 86
87/* read 64-bit timer counter */ 87/* read 64-bit timer counter */
88static cycle_t sirfsoc_timer_read(struct clocksource *cs) 88static u64 sirfsoc_timer_read(struct clocksource *cs)
89{ 89{
90 u64 cycles; 90 u64 cycles;
91 91
diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c
index 6555821bbdae..c0b5df3167a0 100644
--- a/drivers/clocksource/timer-atmel-pit.c
+++ b/drivers/clocksource/timer-atmel-pit.c
@@ -73,7 +73,7 @@ static inline void pit_write(void __iomem *base, unsigned int reg_offset, unsign
73 * Clocksource: just a monotonic counter of MCK/16 cycles. 73 * Clocksource: just a monotonic counter of MCK/16 cycles.
74 * We don't care whether or not PIT irqs are enabled. 74 * We don't care whether or not PIT irqs are enabled.
75 */ 75 */
76static cycle_t read_pit_clk(struct clocksource *cs) 76static u64 read_pit_clk(struct clocksource *cs)
77{ 77{
78 struct pit_data *data = clksrc_to_pit_data(cs); 78 struct pit_data *data = clksrc_to_pit_data(cs);
79 unsigned long flags; 79 unsigned long flags;
diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
index e90ab5b63a90..be4ac7604136 100644
--- a/drivers/clocksource/timer-atmel-st.c
+++ b/drivers/clocksource/timer-atmel-st.c
@@ -92,7 +92,7 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
92 return IRQ_NONE; 92 return IRQ_NONE;
93} 93}
94 94
95static cycle_t read_clk32k(struct clocksource *cs) 95static u64 read_clk32k(struct clocksource *cs)
96{ 96{
97 return read_CRTR(); 97 return read_CRTR();
98} 98}
diff --git a/drivers/clocksource/timer-nps.c b/drivers/clocksource/timer-nps.c
index 8da5e93b6810..da1f7986e477 100644
--- a/drivers/clocksource/timer-nps.c
+++ b/drivers/clocksource/timer-nps.c
@@ -77,11 +77,11 @@ static int __init nps_get_timer_clk(struct device_node *node,
77 return 0; 77 return 0;
78} 78}
79 79
80static cycle_t nps_clksrc_read(struct clocksource *clksrc) 80static u64 nps_clksrc_read(struct clocksource *clksrc)
81{ 81{
82 int cluster = raw_smp_processor_id() >> NPS_CLUSTER_OFFSET; 82 int cluster = raw_smp_processor_id() >> NPS_CLUSTER_OFFSET;
83 83
84 return (cycle_t)ioread32be(nps_msu_reg_low_addr[cluster]); 84 return (u64)ioread32be(nps_msu_reg_low_addr[cluster]);
85} 85}
86 86
87static int __init nps_setup_clocksource(struct device_node *node) 87static int __init nps_setup_clocksource(struct device_node *node)
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c
index c32148ec7a38..bfa981ac1eaf 100644
--- a/drivers/clocksource/timer-prima2.c
+++ b/drivers/clocksource/timer-prima2.c
@@ -72,7 +72,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
72} 72}
73 73
74/* read 64-bit timer counter */ 74/* read 64-bit timer counter */
75static cycle_t notrace sirfsoc_timer_read(struct clocksource *cs) 75static u64 notrace sirfsoc_timer_read(struct clocksource *cs)
76{ 76{
77 u64 cycles; 77 u64 cycles;
78 78
diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index 4f87f3e76d83..a3e662b15964 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -152,7 +152,7 @@ static irqreturn_t sun5i_timer_interrupt(int irq, void *dev_id)
152 return IRQ_HANDLED; 152 return IRQ_HANDLED;
153} 153}
154 154
155static cycle_t sun5i_clksrc_read(struct clocksource *clksrc) 155static u64 sun5i_clksrc_read(struct clocksource *clksrc)
156{ 156{
157 struct sun5i_timer_clksrc *cs = to_sun5i_timer_clksrc(clksrc); 157 struct sun5i_timer_clksrc *cs = to_sun5i_timer_clksrc(clksrc);
158 158
diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c
index cf5b14e442e4..624067712ef0 100644
--- a/drivers/clocksource/timer-ti-32k.c
+++ b/drivers/clocksource/timer-ti-32k.c
@@ -65,11 +65,11 @@ static inline struct ti_32k *to_ti_32k(struct clocksource *cs)
65 return container_of(cs, struct ti_32k, cs); 65 return container_of(cs, struct ti_32k, cs);
66} 66}
67 67
68static cycle_t notrace ti_32k_read_cycles(struct clocksource *cs) 68static u64 notrace ti_32k_read_cycles(struct clocksource *cs)
69{ 69{
70 struct ti_32k *ti = to_ti_32k(cs); 70 struct ti_32k *ti = to_ti_32k(cs);
71 71
72 return (cycle_t)readl_relaxed(ti->counter); 72 return (u64)readl_relaxed(ti->counter);
73} 73}
74 74
75static struct ti_32k ti_32k_timer = { 75static struct ti_32k ti_32k_timer = {
diff --git a/drivers/clocksource/vt8500_timer.c b/drivers/clocksource/vt8500_timer.c
index b15069483fbd..d02b51075ad1 100644
--- a/drivers/clocksource/vt8500_timer.c
+++ b/drivers/clocksource/vt8500_timer.c
@@ -53,7 +53,7 @@
53 53
54static void __iomem *regbase; 54static void __iomem *regbase;
55 55
56static cycle_t vt8500_timer_read(struct clocksource *cs) 56static u64 vt8500_timer_read(struct clocksource *cs)
57{ 57{
58 int loops = msecs_to_loops(10); 58 int loops = msecs_to_loops(10);
59 writel(3, regbase + TIMER_CTRL_VAL); 59 writel(3, regbase + TIMER_CTRL_VAL);
@@ -75,7 +75,7 @@ static int vt8500_timer_set_next_event(unsigned long cycles,
75 struct clock_event_device *evt) 75 struct clock_event_device *evt)
76{ 76{
77 int loops = msecs_to_loops(10); 77 int loops = msecs_to_loops(10);
78 cycle_t alarm = clocksource.read(&clocksource) + cycles; 78 u64 alarm = clocksource.read(&clocksource) + cycles;
79 while ((readl(regbase + TIMER_AS_VAL) & TIMER_MATCH_W_ACTIVE) 79 while ((readl(regbase + TIMER_AS_VAL) & TIMER_MATCH_W_ACTIVE)
80 && --loops) 80 && --loops)
81 cpu_relax(); 81 cpu_relax();
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 446802ae8f1b..b44b32f21e61 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -135,9 +135,9 @@ u64 hv_do_hypercall(u64 control, void *input, void *output)
135EXPORT_SYMBOL_GPL(hv_do_hypercall); 135EXPORT_SYMBOL_GPL(hv_do_hypercall);
136 136
137#ifdef CONFIG_X86_64 137#ifdef CONFIG_X86_64
138static cycle_t read_hv_clock_tsc(struct clocksource *arg) 138static u64 read_hv_clock_tsc(struct clocksource *arg)
139{ 139{
140 cycle_t current_tick; 140 u64 current_tick;
141 struct ms_hyperv_tsc_page *tsc_pg = hv_context.tsc_page; 141 struct ms_hyperv_tsc_page *tsc_pg = hv_context.tsc_page;
142 142
143 if (tsc_pg->tsc_sequence != 0) { 143 if (tsc_pg->tsc_sequence != 0) {
@@ -146,7 +146,7 @@ static cycle_t read_hv_clock_tsc(struct clocksource *arg)
146 */ 146 */
147 147
148 while (1) { 148 while (1) {
149 cycle_t tmp; 149 u64 tmp;
150 u32 sequence = tsc_pg->tsc_sequence; 150 u32 sequence = tsc_pg->tsc_sequence;
151 u64 cur_tsc; 151 u64 cur_tsc;
152 u64 scale = tsc_pg->tsc_scale; 152 u64 scale = tsc_pg->tsc_scale;
@@ -350,7 +350,7 @@ int hv_post_message(union hv_connection_id connection_id,
350static int hv_ce_set_next_event(unsigned long delta, 350static int hv_ce_set_next_event(unsigned long delta,
351 struct clock_event_device *evt) 351 struct clock_event_device *evt)
352{ 352{
353 cycle_t current_tick; 353 u64 current_tick;
354 354
355 WARN_ON(!clockevent_state_oneshot(evt)); 355 WARN_ON(!clockevent_state_oneshot(evt));
356 356
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index c0178a122940..c01c09e9916d 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -152,12 +152,12 @@ static inline void gic_map_to_vpe(unsigned int intr, unsigned int vpe)
152} 152}
153 153
154#ifdef CONFIG_CLKSRC_MIPS_GIC 154#ifdef CONFIG_CLKSRC_MIPS_GIC
155cycle_t gic_read_count(void) 155u64 gic_read_count(void)
156{ 156{
157 unsigned int hi, hi2, lo; 157 unsigned int hi, hi2, lo;
158 158
159 if (mips_cm_is64) 159 if (mips_cm_is64)
160 return (cycle_t)gic_read(GIC_REG(SHARED, GIC_SH_COUNTER)); 160 return (u64)gic_read(GIC_REG(SHARED, GIC_SH_COUNTER));
161 161
162 do { 162 do {
163 hi = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32)); 163 hi = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32));
@@ -165,7 +165,7 @@ cycle_t gic_read_count(void)
165 hi2 = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32)); 165 hi2 = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32));
166 } while (hi2 != hi); 166 } while (hi2 != hi);
167 167
168 return (((cycle_t) hi) << 32) + lo; 168 return (((u64) hi) << 32) + lo;
169} 169}
170 170
171unsigned int gic_get_count_width(void) 171unsigned int gic_get_count_width(void)
@@ -179,7 +179,7 @@ unsigned int gic_get_count_width(void)
179 return bits; 179 return bits;
180} 180}
181 181
182void gic_write_compare(cycle_t cnt) 182void gic_write_compare(u64 cnt)
183{ 183{
184 if (mips_cm_is64) { 184 if (mips_cm_is64) {
185 gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE), cnt); 185 gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE), cnt);
@@ -191,7 +191,7 @@ void gic_write_compare(cycle_t cnt)
191 } 191 }
192} 192}
193 193
194void gic_write_cpu_compare(cycle_t cnt, int cpu) 194void gic_write_cpu_compare(u64 cnt, int cpu)
195{ 195{
196 unsigned long flags; 196 unsigned long flags;
197 197
@@ -211,17 +211,17 @@ void gic_write_cpu_compare(cycle_t cnt, int cpu)
211 local_irq_restore(flags); 211 local_irq_restore(flags);
212} 212}
213 213
214cycle_t gic_read_compare(void) 214u64 gic_read_compare(void)
215{ 215{
216 unsigned int hi, lo; 216 unsigned int hi, lo;
217 217
218 if (mips_cm_is64) 218 if (mips_cm_is64)
219 return (cycle_t)gic_read(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE)); 219 return (u64)gic_read(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE));
220 220
221 hi = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_HI)); 221 hi = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_HI));
222 lo = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_LO)); 222 lo = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_LO));
223 223
224 return (((cycle_t) hi) << 32) + lo; 224 return (((u64) hi) << 32) + lo;
225} 225}
226 226
227void gic_start_count(void) 227void gic_start_count(void)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
index b03e4f58d02e..a533a6cc2d53 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
@@ -122,7 +122,7 @@
122#include "xgbe.h" 122#include "xgbe.h"
123#include "xgbe-common.h" 123#include "xgbe-common.h"
124 124
125static cycle_t xgbe_cc_read(const struct cyclecounter *cc) 125static u64 xgbe_cc_read(const struct cyclecounter *cc)
126{ 126{
127 struct xgbe_prv_data *pdata = container_of(cc, 127 struct xgbe_prv_data *pdata = container_of(cc,
128 struct xgbe_prv_data, 128 struct xgbe_prv_data,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 688617ac8c29..d8d06fdfc42b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -15223,7 +15223,7 @@ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb)
15223} 15223}
15224 15224
15225/* Read the PHC */ 15225/* Read the PHC */
15226static cycle_t bnx2x_cyclecounter_read(const struct cyclecounter *cc) 15226static u64 bnx2x_cyclecounter_read(const struct cyclecounter *cc)
15227{ 15227{
15228 struct bnx2x *bp = container_of(cc, struct bnx2x, cyclecounter); 15228 struct bnx2x *bp = container_of(cc, struct bnx2x, cyclecounter);
15229 int port = BP_PORT(bp); 15229 int port = BP_PORT(bp);
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index f9e74461bdc0..6ebad3fac81d 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -230,7 +230,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
230 * cyclecounter structure used to construct a ns counter from the 230 * cyclecounter structure used to construct a ns counter from the
231 * arbitrary fixed point registers 231 * arbitrary fixed point registers
232 */ 232 */
233static cycle_t fec_ptp_read(const struct cyclecounter *cc) 233static u64 fec_ptp_read(const struct cyclecounter *cc)
234{ 234{
235 struct fec_enet_private *fep = 235 struct fec_enet_private *fep =
236 container_of(cc, struct fec_enet_private, cc); 236 container_of(cc, struct fec_enet_private, cc);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index ffcf35af4881..eccf1da9356b 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4305,24 +4305,24 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter)
4305/** 4305/**
4306 * e1000e_sanitize_systim - sanitize raw cycle counter reads 4306 * e1000e_sanitize_systim - sanitize raw cycle counter reads
4307 * @hw: pointer to the HW structure 4307 * @hw: pointer to the HW structure
4308 * @systim: cycle_t value read, sanitized and returned 4308 * @systim: time value read, sanitized and returned
4309 * 4309 *
4310 * Errata for 82574/82583 possible bad bits read from SYSTIMH/L: 4310 * Errata for 82574/82583 possible bad bits read from SYSTIMH/L:
4311 * check to see that the time is incrementing at a reasonable 4311 * check to see that the time is incrementing at a reasonable
4312 * rate and is a multiple of incvalue. 4312 * rate and is a multiple of incvalue.
4313 **/ 4313 **/
4314static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim) 4314static u64 e1000e_sanitize_systim(struct e1000_hw *hw, u64 systim)
4315{ 4315{
4316 u64 time_delta, rem, temp; 4316 u64 time_delta, rem, temp;
4317 cycle_t systim_next; 4317 u64 systim_next;
4318 u32 incvalue; 4318 u32 incvalue;
4319 int i; 4319 int i;
4320 4320
4321 incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK; 4321 incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;
4322 for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) { 4322 for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {
4323 /* latch SYSTIMH on read of SYSTIML */ 4323 /* latch SYSTIMH on read of SYSTIML */
4324 systim_next = (cycle_t)er32(SYSTIML); 4324 systim_next = (u64)er32(SYSTIML);
4325 systim_next |= (cycle_t)er32(SYSTIMH) << 32; 4325 systim_next |= (u64)er32(SYSTIMH) << 32;
4326 4326
4327 time_delta = systim_next - systim; 4327 time_delta = systim_next - systim;
4328 temp = time_delta; 4328 temp = time_delta;
@@ -4342,13 +4342,13 @@ static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
4342 * e1000e_cyclecounter_read - read raw cycle counter (used by time counter) 4342 * e1000e_cyclecounter_read - read raw cycle counter (used by time counter)
4343 * @cc: cyclecounter structure 4343 * @cc: cyclecounter structure
4344 **/ 4344 **/
4345static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc) 4345static u64 e1000e_cyclecounter_read(const struct cyclecounter *cc)
4346{ 4346{
4347 struct e1000_adapter *adapter = container_of(cc, struct e1000_adapter, 4347 struct e1000_adapter *adapter = container_of(cc, struct e1000_adapter,
4348 cc); 4348 cc);
4349 struct e1000_hw *hw = &adapter->hw; 4349 struct e1000_hw *hw = &adapter->hw;
4350 u32 systimel, systimeh; 4350 u32 systimel, systimeh;
4351 cycle_t systim; 4351 u64 systim;
4352 /* SYSTIMH latching upon SYSTIML read does not work well. 4352 /* SYSTIMH latching upon SYSTIML read does not work well.
4353 * This means that if SYSTIML overflows after we read it but before 4353 * This means that if SYSTIML overflows after we read it but before
4354 * we read SYSTIMH, the value of SYSTIMH has been incremented and we 4354 * we read SYSTIMH, the value of SYSTIMH has been incremented and we
@@ -4368,8 +4368,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
4368 systimel = systimel_2; 4368 systimel = systimel_2;
4369 } 4369 }
4370 } 4370 }
4371 systim = (cycle_t)systimel; 4371 systim = (u64)systimel;
4372 systim |= (cycle_t)systimeh << 32; 4372 systim |= (u64)systimeh << 32;
4373 4373
4374 if (adapter->flags2 & FLAG2_CHECK_SYSTIM_OVERFLOW) 4374 if (adapter->flags2 & FLAG2_CHECK_SYSTIM_OVERFLOW)
4375 systim = e1000e_sanitize_systim(hw, systim); 4375 systim = e1000e_sanitize_systim(hw, systim);
diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c b/drivers/net/ethernet/intel/e1000e/ptp.c
index ad03763e009a..34cc3be0df8e 100644
--- a/drivers/net/ethernet/intel/e1000e/ptp.c
+++ b/drivers/net/ethernet/intel/e1000e/ptp.c
@@ -127,8 +127,8 @@ static int e1000e_phc_get_syncdevicetime(ktime_t *device,
127 unsigned long flags; 127 unsigned long flags;
128 int i; 128 int i;
129 u32 tsync_ctrl; 129 u32 tsync_ctrl;
130 cycle_t dev_cycles; 130 u64 dev_cycles;
131 cycle_t sys_cycles; 131 u64 sys_cycles;
132 132
133 tsync_ctrl = er32(TSYNCTXCTL); 133 tsync_ctrl = er32(TSYNCTXCTL);
134 tsync_ctrl |= E1000_TSYNCTXCTL_START_SYNC | 134 tsync_ctrl |= E1000_TSYNCTXCTL_START_SYNC |
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index c30eea8399a7..c4477552ce9e 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -77,7 +77,7 @@
77static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter); 77static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter);
78 78
79/* SYSTIM read access for the 82576 */ 79/* SYSTIM read access for the 82576 */
80static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc) 80static u64 igb_ptp_read_82576(const struct cyclecounter *cc)
81{ 81{
82 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); 82 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc);
83 struct e1000_hw *hw = &igb->hw; 83 struct e1000_hw *hw = &igb->hw;
@@ -94,7 +94,7 @@ static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc)
94} 94}
95 95
96/* SYSTIM read access for the 82580 */ 96/* SYSTIM read access for the 82580 */
97static cycle_t igb_ptp_read_82580(const struct cyclecounter *cc) 97static u64 igb_ptp_read_82580(const struct cyclecounter *cc)
98{ 98{
99 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); 99 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc);
100 struct e1000_hw *hw = &igb->hw; 100 struct e1000_hw *hw = &igb->hw;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index a92277683a64..1efb404431e9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -245,7 +245,7 @@ static void ixgbe_ptp_setup_sdp_x540(struct ixgbe_adapter *adapter)
245 * result of SYSTIME is 32bits of "billions of cycles" and 32 bits of 245 * result of SYSTIME is 32bits of "billions of cycles" and 32 bits of
246 * "cycles", rather than seconds and nanoseconds. 246 * "cycles", rather than seconds and nanoseconds.
247 */ 247 */
248static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc) 248static u64 ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc)
249{ 249{
250 struct ixgbe_adapter *adapter = 250 struct ixgbe_adapter *adapter =
251 container_of(hw_cc, struct ixgbe_adapter, hw_cc); 251 container_of(hw_cc, struct ixgbe_adapter, hw_cc);
@@ -282,7 +282,7 @@ static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc)
282 * cyclecounter structure used to construct a ns counter from the 282 * cyclecounter structure used to construct a ns counter from the
283 * arbitrary fixed point registers 283 * arbitrary fixed point registers
284 */ 284 */
285static cycle_t ixgbe_ptp_read_82599(const struct cyclecounter *cc) 285static u64 ixgbe_ptp_read_82599(const struct cyclecounter *cc)
286{ 286{
287 struct ixgbe_adapter *adapter = 287 struct ixgbe_adapter *adapter =
288 container_of(cc, struct ixgbe_adapter, hw_cc); 288 container_of(cc, struct ixgbe_adapter, hw_cc);
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
index a5fc46bbcbe2..015198c14fa8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
@@ -38,7 +38,7 @@
38 38
39/* mlx4_en_read_clock - read raw cycle counter (to be used by time counter) 39/* mlx4_en_read_clock - read raw cycle counter (to be used by time counter)
40 */ 40 */
41static cycle_t mlx4_en_read_clock(const struct cyclecounter *tc) 41static u64 mlx4_en_read_clock(const struct cyclecounter *tc)
42{ 42{
43 struct mlx4_en_dev *mdev = 43 struct mlx4_en_dev *mdev =
44 container_of(tc, struct mlx4_en_dev, cycles); 44 container_of(tc, struct mlx4_en_dev, cycles);
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index b2ca8a635b2e..5e7840a7a33b 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -1823,10 +1823,10 @@ static void unmap_bf_area(struct mlx4_dev *dev)
1823 io_mapping_free(mlx4_priv(dev)->bf_mapping); 1823 io_mapping_free(mlx4_priv(dev)->bf_mapping);
1824} 1824}
1825 1825
1826cycle_t mlx4_read_clock(struct mlx4_dev *dev) 1826u64 mlx4_read_clock(struct mlx4_dev *dev)
1827{ 1827{
1828 u32 clockhi, clocklo, clockhi1; 1828 u32 clockhi, clocklo, clockhi1;
1829 cycle_t cycles; 1829 u64 cycles;
1830 int i; 1830 int i;
1831 struct mlx4_priv *priv = mlx4_priv(dev); 1831 struct mlx4_priv *priv = mlx4_priv(dev);
1832 1832
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c b/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
index 2cd8e56a573b..746a92c13644 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
@@ -49,7 +49,7 @@ void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp, u64 timestamp,
49 hwts->hwtstamp = ns_to_ktime(nsec); 49 hwts->hwtstamp = ns_to_ktime(nsec);
50} 50}
51 51
52static cycle_t mlx5e_read_internal_timer(const struct cyclecounter *cc) 52static u64 mlx5e_read_internal_timer(const struct cyclecounter *cc)
53{ 53{
54 struct mlx5e_tstamp *tstamp = container_of(cc, struct mlx5e_tstamp, 54 struct mlx5e_tstamp *tstamp = container_of(cc, struct mlx5e_tstamp,
55 cycles); 55 cycles);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 7b4c339a8a9a..54e5a786f191 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -557,7 +557,7 @@ int mlx5_core_disable_hca(struct mlx5_core_dev *dev, u16 func_id)
557 return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); 557 return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
558} 558}
559 559
560cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev) 560u64 mlx5_read_internal_timer(struct mlx5_core_dev *dev)
561{ 561{
562 u32 timer_h, timer_h1, timer_l; 562 u32 timer_h, timer_h1, timer_l;
563 563
@@ -567,7 +567,7 @@ cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev)
567 if (timer_h != timer_h1) /* wrap around */ 567 if (timer_h != timer_h1) /* wrap around */
568 timer_l = ioread32be(&dev->iseg->internal_timer_l); 568 timer_l = ioread32be(&dev->iseg->internal_timer_l);
569 569
570 return (cycle_t)timer_l | (cycle_t)timer_h1 << 32; 570 return (u64)timer_l | (u64)timer_h1 << 32;
571} 571}
572 572
573static int mlx5_irq_set_affinity_hint(struct mlx5_core_dev *mdev, int i) 573static int mlx5_irq_set_affinity_hint(struct mlx5_core_dev *mdev, int i)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index e0a8fbdd1446..d4a99c9757cb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -106,7 +106,7 @@ int mlx5_modify_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
106int mlx5_destroy_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy, 106int mlx5_destroy_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
107 u32 element_id); 107 u32 element_id);
108int mlx5_wait_for_vf_pages(struct mlx5_core_dev *dev); 108int mlx5_wait_for_vf_pages(struct mlx5_core_dev *dev);
109cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev); 109u64 mlx5_read_internal_timer(struct mlx5_core_dev *dev);
110u32 mlx5_get_msix_vec(struct mlx5_core_dev *dev, int vecidx); 110u32 mlx5_get_msix_vec(struct mlx5_core_dev *dev, int vecidx);
111struct mlx5_eq *mlx5_eqn2eq(struct mlx5_core_dev *dev, int eqn); 111struct mlx5_eq *mlx5_eqn2eq(struct mlx5_core_dev *dev, int eqn);
112void mlx5_cq_tasklet_cb(unsigned long data); 112void mlx5_cq_tasklet_cb(unsigned long data);
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 0c0d48e5bea4..32279d21c836 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -121,7 +121,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
121 return type == match ? 0 : -1; 121 return type == match ? 0 : -1;
122} 122}
123 123
124static cycle_t cpts_systim_read(const struct cyclecounter *cc) 124static u64 cpts_systim_read(const struct cyclecounter *cc)
125{ 125{
126 u64 val = 0; 126 u64 val = 0;
127 struct cpts_event *event; 127 struct cpts_event *event;
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index dda39d8fa189..b717ed9d2b75 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -25,13 +25,13 @@
25 25
26struct arch_timer_kvm { 26struct arch_timer_kvm {
27 /* Virtual offset */ 27 /* Virtual offset */
28 cycle_t cntvoff; 28 u64 cntvoff;
29}; 29};
30 30
31struct arch_timer_cpu { 31struct arch_timer_cpu {
32 /* Registers: control register, timer value */ 32 /* Registers: control register, timer value */
33 u32 cntv_ctl; /* Saved/restored */ 33 u32 cntv_ctl; /* Saved/restored */
34 cycle_t cntv_cval; /* Saved/restored */ 34 u64 cntv_cval; /* Saved/restored */
35 35
36 /* 36 /*
37 * Anything that is not used directly from assembly code goes 37 * Anything that is not used directly from assembly code goes
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 65602d395a52..e315d04a2fd9 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -75,8 +75,8 @@ struct module;
75 * structure. 75 * structure.
76 */ 76 */
77struct clocksource { 77struct clocksource {
78 cycle_t (*read)(struct clocksource *cs); 78 u64 (*read)(struct clocksource *cs);
79 cycle_t mask; 79 u64 mask;
80 u32 mult; 80 u32 mult;
81 u32 shift; 81 u32 shift;
82 u64 max_idle_ns; 82 u64 max_idle_ns;
@@ -98,8 +98,8 @@ struct clocksource {
98#ifdef CONFIG_CLOCKSOURCE_WATCHDOG 98#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
99 /* Watchdog related data, used by the framework */ 99 /* Watchdog related data, used by the framework */
100 struct list_head wd_list; 100 struct list_head wd_list;
101 cycle_t cs_last; 101 u64 cs_last;
102 cycle_t wd_last; 102 u64 wd_last;
103#endif 103#endif
104 struct module *owner; 104 struct module *owner;
105}; 105};
@@ -117,7 +117,7 @@ struct clocksource {
117#define CLOCK_SOURCE_RESELECT 0x100 117#define CLOCK_SOURCE_RESELECT 0x100
118 118
119/* simplify initialization of mask field */ 119/* simplify initialization of mask field */
120#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) 120#define CLOCKSOURCE_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
121 121
122static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from) 122static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from)
123{ 123{
@@ -176,7 +176,7 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
176 * 176 *
177 * XXX - This could use some mult_lxl_ll() asm optimization 177 * XXX - This could use some mult_lxl_ll() asm optimization
178 */ 178 */
179static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) 179static inline s64 clocksource_cyc2ns(u64 cycles, u32 mult, u32 shift)
180{ 180{
181 return ((u64) cycles * mult) >> shift; 181 return ((u64) cycles * mult) >> shift;
182} 182}
@@ -236,13 +236,13 @@ static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz
236 236
237extern int timekeeping_notify(struct clocksource *clock); 237extern int timekeeping_notify(struct clocksource *clock);
238 238
239extern cycle_t clocksource_mmio_readl_up(struct clocksource *); 239extern u64 clocksource_mmio_readl_up(struct clocksource *);
240extern cycle_t clocksource_mmio_readl_down(struct clocksource *); 240extern u64 clocksource_mmio_readl_down(struct clocksource *);
241extern cycle_t clocksource_mmio_readw_up(struct clocksource *); 241extern u64 clocksource_mmio_readw_up(struct clocksource *);
242extern cycle_t clocksource_mmio_readw_down(struct clocksource *); 242extern u64 clocksource_mmio_readw_down(struct clocksource *);
243 243
244extern int clocksource_mmio_init(void __iomem *, const char *, 244extern int clocksource_mmio_init(void __iomem *, const char *,
245 unsigned long, int, unsigned, cycle_t (*)(struct clocksource *)); 245 unsigned long, int, unsigned, u64 (*)(struct clocksource *));
246 246
247extern int clocksource_i8253_init(void); 247extern int clocksource_i8253_init(void);
248 248
diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
index 1f79b20918b1..4334106f44c3 100644
--- a/include/linux/dw_apb_timer.h
+++ b/include/linux/dw_apb_timer.h
@@ -50,6 +50,6 @@ dw_apb_clocksource_init(unsigned rating, const char *name, void __iomem *base,
50 unsigned long freq); 50 unsigned long freq);
51void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs); 51void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs);
52void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs); 52void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs);
53cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs); 53u64 dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);
54 54
55#endif /* __DW_APB_TIMER_H__ */ 55#endif /* __DW_APB_TIMER_H__ */
diff --git a/include/linux/irqchip/mips-gic.h b/include/linux/irqchip/mips-gic.h
index 81f930b0bca9..7b49c71c968b 100644
--- a/include/linux/irqchip/mips-gic.h
+++ b/include/linux/irqchip/mips-gic.h
@@ -259,11 +259,11 @@ extern void gic_init(unsigned long gic_base_addr,
259 unsigned long gic_addrspace_size, unsigned int cpu_vec, 259 unsigned long gic_addrspace_size, unsigned int cpu_vec,
260 unsigned int irqbase); 260 unsigned int irqbase);
261extern void gic_clocksource_init(unsigned int); 261extern void gic_clocksource_init(unsigned int);
262extern cycle_t gic_read_count(void); 262extern u64 gic_read_count(void);
263extern unsigned int gic_get_count_width(void); 263extern unsigned int gic_get_count_width(void);
264extern cycle_t gic_read_compare(void); 264extern u64 gic_read_compare(void);
265extern void gic_write_compare(cycle_t cnt); 265extern void gic_write_compare(u64 cnt);
266extern void gic_write_cpu_compare(cycle_t cnt, int cpu); 266extern void gic_write_cpu_compare(u64 cnt, int cpu);
267extern void gic_start_count(void); 267extern void gic_start_count(void);
268extern void gic_stop_count(void); 268extern void gic_stop_count(void);
269extern int gic_get_c0_compare_int(void); 269extern int gic_get_c0_compare_int(void);
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index c9f379689dd0..93bdb3485192 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1460,7 +1460,7 @@ int mlx4_get_roce_gid_from_slave(struct mlx4_dev *dev, int port, int slave_id,
1460int mlx4_FLOW_STEERING_IB_UC_QP_RANGE(struct mlx4_dev *dev, u32 min_range_qpn, 1460int mlx4_FLOW_STEERING_IB_UC_QP_RANGE(struct mlx4_dev *dev, u32 min_range_qpn,
1461 u32 max_range_qpn); 1461 u32 max_range_qpn);
1462 1462
1463cycle_t mlx4_read_clock(struct mlx4_dev *dev); 1463u64 mlx4_read_clock(struct mlx4_dev *dev);
1464 1464
1465struct mlx4_active_ports { 1465struct mlx4_active_ports {
1466 DECLARE_BITMAP(ports, MLX4_MAX_PORTS); 1466 DECLARE_BITMAP(ports, MLX4_MAX_PORTS);
diff --git a/include/linux/timecounter.h b/include/linux/timecounter.h
index 4382035a75bb..2496ad4cfc99 100644
--- a/include/linux/timecounter.h
+++ b/include/linux/timecounter.h
@@ -20,7 +20,7 @@
20#include <linux/types.h> 20#include <linux/types.h>
21 21
22/* simplify initialization of mask field */ 22/* simplify initialization of mask field */
23#define CYCLECOUNTER_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) 23#define CYCLECOUNTER_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
24 24
25/** 25/**
26 * struct cyclecounter - hardware abstraction for a free running counter 26 * struct cyclecounter - hardware abstraction for a free running counter
@@ -37,8 +37,8 @@
37 * @shift: cycle to nanosecond divisor (power of two) 37 * @shift: cycle to nanosecond divisor (power of two)
38 */ 38 */
39struct cyclecounter { 39struct cyclecounter {
40 cycle_t (*read)(const struct cyclecounter *cc); 40 u64 (*read)(const struct cyclecounter *cc);
41 cycle_t mask; 41 u64 mask;
42 u32 mult; 42 u32 mult;
43 u32 shift; 43 u32 shift;
44}; 44};
@@ -63,7 +63,7 @@ struct cyclecounter {
63 */ 63 */
64struct timecounter { 64struct timecounter {
65 const struct cyclecounter *cc; 65 const struct cyclecounter *cc;
66 cycle_t cycle_last; 66 u64 cycle_last;
67 u64 nsec; 67 u64 nsec;
68 u64 mask; 68 u64 mask;
69 u64 frac; 69 u64 frac;
@@ -77,7 +77,7 @@ struct timecounter {
77 * @frac: pointer to storage for the fractional nanoseconds. 77 * @frac: pointer to storage for the fractional nanoseconds.
78 */ 78 */
79static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc, 79static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
80 cycle_t cycles, u64 mask, u64 *frac) 80 u64 cycles, u64 mask, u64 *frac)
81{ 81{
82 u64 ns = (u64) cycles; 82 u64 ns = (u64) cycles;
83 83
@@ -134,6 +134,6 @@ extern u64 timecounter_read(struct timecounter *tc);
134 * in the past. 134 * in the past.
135 */ 135 */
136extern u64 timecounter_cyc2time(struct timecounter *tc, 136extern u64 timecounter_cyc2time(struct timecounter *tc,
137 cycle_t cycle_tstamp); 137 u64 cycle_tstamp);
138 138
139#endif 139#endif
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index e88005459035..110f4532188c 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -29,9 +29,9 @@
29 */ 29 */
30struct tk_read_base { 30struct tk_read_base {
31 struct clocksource *clock; 31 struct clocksource *clock;
32 cycle_t (*read)(struct clocksource *cs); 32 u64 (*read)(struct clocksource *cs);
33 cycle_t mask; 33 u64 mask;
34 cycle_t cycle_last; 34 u64 cycle_last;
35 u32 mult; 35 u32 mult;
36 u32 shift; 36 u32 shift;
37 u64 xtime_nsec; 37 u64 xtime_nsec;
@@ -97,7 +97,7 @@ struct timekeeper {
97 struct timespec64 raw_time; 97 struct timespec64 raw_time;
98 98
99 /* The following members are for timekeeping internal use */ 99 /* The following members are for timekeeping internal use */
100 cycle_t cycle_interval; 100 u64 cycle_interval;
101 u64 xtime_interval; 101 u64 xtime_interval;
102 s64 xtime_remainder; 102 s64 xtime_remainder;
103 u32 raw_interval; 103 u32 raw_interval;
@@ -136,7 +136,7 @@ extern void update_vsyscall_tz(void);
136 136
137extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, 137extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm,
138 struct clocksource *c, u32 mult, 138 struct clocksource *c, u32 mult,
139 cycle_t cycle_last); 139 u64 cycle_last);
140extern void update_vsyscall_tz(void); 140extern void update_vsyscall_tz(void);
141 141
142#else 142#else
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 361f8bf1429d..d2e804e15c3e 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -293,7 +293,7 @@ extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw,
293 * @cs_was_changed_seq: The sequence number of clocksource change events 293 * @cs_was_changed_seq: The sequence number of clocksource change events
294 */ 294 */
295struct system_time_snapshot { 295struct system_time_snapshot {
296 cycle_t cycles; 296 u64 cycles;
297 ktime_t real; 297 ktime_t real;
298 ktime_t raw; 298 ktime_t raw;
299 unsigned int clock_was_set_seq; 299 unsigned int clock_was_set_seq;
@@ -321,7 +321,7 @@ struct system_device_crosststamp {
321 * timekeeping code to verify comparibility of two cycle values 321 * timekeeping code to verify comparibility of two cycle values
322 */ 322 */
323struct system_counterval_t { 323struct system_counterval_t {
324 cycle_t cycles; 324 u64 cycles;
325 struct clocksource *cs; 325 struct clocksource *cs;
326}; 326};
327 327
diff --git a/include/linux/types.h b/include/linux/types.h
index d501ad3ba247..1e7bd24848fc 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -228,8 +228,5 @@ struct callback_head {
228typedef void (*rcu_callback_t)(struct rcu_head *head); 228typedef void (*rcu_callback_t)(struct rcu_head *head);
229typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func); 229typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func);
230 230
231/* clocksource cycle base type */
232typedef u64 cycle_t;
233
234#endif /* __ASSEMBLY__ */ 231#endif /* __ASSEMBLY__ */
235#endif /* _LINUX_TYPES_H */ 232#endif /* _LINUX_TYPES_H */
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 150242ccfcd2..665985b0a89a 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -170,7 +170,7 @@ void clocksource_mark_unstable(struct clocksource *cs)
170static void clocksource_watchdog(unsigned long data) 170static void clocksource_watchdog(unsigned long data)
171{ 171{
172 struct clocksource *cs; 172 struct clocksource *cs;
173 cycle_t csnow, wdnow, cslast, wdlast, delta; 173 u64 csnow, wdnow, cslast, wdlast, delta;
174 int64_t wd_nsec, cs_nsec; 174 int64_t wd_nsec, cs_nsec;
175 int next_cpu, reset_pending; 175 int next_cpu, reset_pending;
176 176
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 555e21f7b966..a4a0e478e44d 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -59,9 +59,9 @@
59#define JIFFIES_SHIFT 8 59#define JIFFIES_SHIFT 8
60#endif 60#endif
61 61
62static cycle_t jiffies_read(struct clocksource *cs) 62static u64 jiffies_read(struct clocksource *cs)
63{ 63{
64 return (cycle_t) jiffies; 64 return (u64) jiffies;
65} 65}
66 66
67static struct clocksource clocksource_jiffies = { 67static struct clocksource clocksource_jiffies = {
diff --git a/kernel/time/timecounter.c b/kernel/time/timecounter.c
index 4687b3104bae..8afd78932bdf 100644
--- a/kernel/time/timecounter.c
+++ b/kernel/time/timecounter.c
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(timecounter_init);
43 */ 43 */
44static u64 timecounter_read_delta(struct timecounter *tc) 44static u64 timecounter_read_delta(struct timecounter *tc)
45{ 45{
46 cycle_t cycle_now, cycle_delta; 46 u64 cycle_now, cycle_delta;
47 u64 ns_offset; 47 u64 ns_offset;
48 48
49 /* read cycle counter: */ 49 /* read cycle counter: */
@@ -80,7 +80,7 @@ EXPORT_SYMBOL_GPL(timecounter_read);
80 * time previous to the time stored in the cycle counter. 80 * time previous to the time stored in the cycle counter.
81 */ 81 */
82static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc, 82static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc,
83 cycle_t cycles, u64 mask, u64 frac) 83 u64 cycles, u64 mask, u64 frac)
84{ 84{
85 u64 ns = (u64) cycles; 85 u64 ns = (u64) cycles;
86 86
@@ -90,7 +90,7 @@ static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc,
90} 90}
91 91
92u64 timecounter_cyc2time(struct timecounter *tc, 92u64 timecounter_cyc2time(struct timecounter *tc,
93 cycle_t cycle_tstamp) 93 u64 cycle_tstamp)
94{ 94{
95 u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask; 95 u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask;
96 u64 nsec = tc->nsec, frac = tc->frac; 96 u64 nsec = tc->nsec, frac = tc->frac;
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index da233cdf89b0..f4152a69277f 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -119,10 +119,10 @@ static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta)
119#ifdef CONFIG_DEBUG_TIMEKEEPING 119#ifdef CONFIG_DEBUG_TIMEKEEPING
120#define WARNING_FREQ (HZ*300) /* 5 minute rate-limiting */ 120#define WARNING_FREQ (HZ*300) /* 5 minute rate-limiting */
121 121
122static void timekeeping_check_update(struct timekeeper *tk, cycle_t offset) 122static void timekeeping_check_update(struct timekeeper *tk, u64 offset)
123{ 123{
124 124
125 cycle_t max_cycles = tk->tkr_mono.clock->max_cycles; 125 u64 max_cycles = tk->tkr_mono.clock->max_cycles;
126 const char *name = tk->tkr_mono.clock->name; 126 const char *name = tk->tkr_mono.clock->name;
127 127
128 if (offset > max_cycles) { 128 if (offset > max_cycles) {
@@ -158,10 +158,10 @@ static void timekeeping_check_update(struct timekeeper *tk, cycle_t offset)
158 } 158 }
159} 159}
160 160
161static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr) 161static inline u64 timekeeping_get_delta(struct tk_read_base *tkr)
162{ 162{
163 struct timekeeper *tk = &tk_core.timekeeper; 163 struct timekeeper *tk = &tk_core.timekeeper;
164 cycle_t now, last, mask, max, delta; 164 u64 now, last, mask, max, delta;
165 unsigned int seq; 165 unsigned int seq;
166 166
167 /* 167 /*
@@ -199,12 +199,12 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
199 return delta; 199 return delta;
200} 200}
201#else 201#else
202static inline void timekeeping_check_update(struct timekeeper *tk, cycle_t offset) 202static inline void timekeeping_check_update(struct timekeeper *tk, u64 offset)
203{ 203{
204} 204}
205static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr) 205static inline u64 timekeeping_get_delta(struct tk_read_base *tkr)
206{ 206{
207 cycle_t cycle_now, delta; 207 u64 cycle_now, delta;
208 208
209 /* read clocksource */ 209 /* read clocksource */
210 cycle_now = tkr->read(tkr->clock); 210 cycle_now = tkr->read(tkr->clock);
@@ -229,7 +229,7 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
229 */ 229 */
230static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock) 230static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
231{ 231{
232 cycle_t interval; 232 u64 interval;
233 u64 tmp, ntpinterval; 233 u64 tmp, ntpinterval;
234 struct clocksource *old_clock; 234 struct clocksource *old_clock;
235 235
@@ -254,7 +254,7 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
254 if (tmp == 0) 254 if (tmp == 0)
255 tmp = 1; 255 tmp = 1;
256 256
257 interval = (cycle_t) tmp; 257 interval = (u64) tmp;
258 tk->cycle_interval = interval; 258 tk->cycle_interval = interval;
259 259
260 /* Go back from cycles -> shifted ns */ 260 /* Go back from cycles -> shifted ns */
@@ -298,8 +298,7 @@ u32 (*arch_gettimeoffset)(void) = default_arch_gettimeoffset;
298static inline u32 arch_gettimeoffset(void) { return 0; } 298static inline u32 arch_gettimeoffset(void) { return 0; }
299#endif 299#endif
300 300
301static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr, 301static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr, u64 delta)
302 cycle_t delta)
303{ 302{
304 u64 nsec; 303 u64 nsec;
305 304
@@ -312,16 +311,15 @@ static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr,
312 311
313static inline u64 timekeeping_get_ns(struct tk_read_base *tkr) 312static inline u64 timekeeping_get_ns(struct tk_read_base *tkr)
314{ 313{
315 cycle_t delta; 314 u64 delta;
316 315
317 delta = timekeeping_get_delta(tkr); 316 delta = timekeeping_get_delta(tkr);
318 return timekeeping_delta_to_ns(tkr, delta); 317 return timekeeping_delta_to_ns(tkr, delta);
319} 318}
320 319
321static inline u64 timekeeping_cycles_to_ns(struct tk_read_base *tkr, 320static inline u64 timekeeping_cycles_to_ns(struct tk_read_base *tkr, u64 cycles)
322 cycle_t cycles)
323{ 321{
324 cycle_t delta; 322 u64 delta;
325 323
326 /* calculate the delta since the last update_wall_time */ 324 /* calculate the delta since the last update_wall_time */
327 delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask); 325 delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask);
@@ -454,9 +452,9 @@ u64 notrace ktime_get_boot_fast_ns(void)
454EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns); 452EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
455 453
456/* Suspend-time cycles value for halted fast timekeeper. */ 454/* Suspend-time cycles value for halted fast timekeeper. */
457static cycle_t cycles_at_suspend; 455static u64 cycles_at_suspend;
458 456
459static cycle_t dummy_clock_read(struct clocksource *cs) 457static u64 dummy_clock_read(struct clocksource *cs)
460{ 458{
461 return cycles_at_suspend; 459 return cycles_at_suspend;
462} 460}
@@ -650,7 +648,7 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action)
650static void timekeeping_forward_now(struct timekeeper *tk) 648static void timekeeping_forward_now(struct timekeeper *tk)
651{ 649{
652 struct clocksource *clock = tk->tkr_mono.clock; 650 struct clocksource *clock = tk->tkr_mono.clock;
653 cycle_t cycle_now, delta; 651 u64 cycle_now, delta;
654 u64 nsec; 652 u64 nsec;
655 653
656 cycle_now = tk->tkr_mono.read(clock); 654 cycle_now = tk->tkr_mono.read(clock);
@@ -923,7 +921,7 @@ void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)
923 ktime_t base_real; 921 ktime_t base_real;
924 u64 nsec_raw; 922 u64 nsec_raw;
925 u64 nsec_real; 923 u64 nsec_real;
926 cycle_t now; 924 u64 now;
927 925
928 WARN_ON_ONCE(timekeeping_suspended); 926 WARN_ON_ONCE(timekeeping_suspended);
929 927
@@ -982,8 +980,8 @@ static int scale64_check_overflow(u64 mult, u64 div, u64 *base)
982 * interval is partial_history_cycles. 980 * interval is partial_history_cycles.
983 */ 981 */
984static int adjust_historical_crosststamp(struct system_time_snapshot *history, 982static int adjust_historical_crosststamp(struct system_time_snapshot *history,
985 cycle_t partial_history_cycles, 983 u64 partial_history_cycles,
986 cycle_t total_history_cycles, 984 u64 total_history_cycles,
987 bool discontinuity, 985 bool discontinuity,
988 struct system_device_crosststamp *ts) 986 struct system_device_crosststamp *ts)
989{ 987{
@@ -1047,7 +1045,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
1047/* 1045/*
1048 * cycle_between - true if test occurs chronologically between before and after 1046 * cycle_between - true if test occurs chronologically between before and after
1049 */ 1047 */
1050static bool cycle_between(cycle_t before, cycle_t test, cycle_t after) 1048static bool cycle_between(u64 before, u64 test, u64 after)
1051{ 1049{
1052 if (test > before && test < after) 1050 if (test > before && test < after)
1053 return true; 1051 return true;
@@ -1077,7 +1075,7 @@ int get_device_system_crosststamp(int (*get_time_fn)
1077{ 1075{
1078 struct system_counterval_t system_counterval; 1076 struct system_counterval_t system_counterval;
1079 struct timekeeper *tk = &tk_core.timekeeper; 1077 struct timekeeper *tk = &tk_core.timekeeper;
1080 cycle_t cycles, now, interval_start; 1078 u64 cycles, now, interval_start;
1081 unsigned int clock_was_set_seq = 0; 1079 unsigned int clock_was_set_seq = 0;
1082 ktime_t base_real, base_raw; 1080 ktime_t base_real, base_raw;
1083 u64 nsec_real, nsec_raw; 1081 u64 nsec_real, nsec_raw;
@@ -1138,7 +1136,7 @@ int get_device_system_crosststamp(int (*get_time_fn)
1138 * current interval 1136 * current interval
1139 */ 1137 */
1140 if (do_interp) { 1138 if (do_interp) {
1141 cycle_t partial_history_cycles, total_history_cycles; 1139 u64 partial_history_cycles, total_history_cycles;
1142 bool discontinuity; 1140 bool discontinuity;
1143 1141
1144 /* 1142 /*
@@ -1644,7 +1642,7 @@ void timekeeping_resume(void)
1644 struct clocksource *clock = tk->tkr_mono.clock; 1642 struct clocksource *clock = tk->tkr_mono.clock;
1645 unsigned long flags; 1643 unsigned long flags;
1646 struct timespec64 ts_new, ts_delta; 1644 struct timespec64 ts_new, ts_delta;
1647 cycle_t cycle_now; 1645 u64 cycle_now;
1648 1646
1649 sleeptime_injected = false; 1647 sleeptime_injected = false;
1650 read_persistent_clock64(&ts_new); 1648 read_persistent_clock64(&ts_new);
@@ -2010,11 +2008,10 @@ static inline unsigned int accumulate_nsecs_to_secs(struct timekeeper *tk)
2010 * 2008 *
2011 * Returns the unconsumed cycles. 2009 * Returns the unconsumed cycles.
2012 */ 2010 */
2013static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset, 2011static u64 logarithmic_accumulation(struct timekeeper *tk, u64 offset,
2014 u32 shift, 2012 u32 shift, unsigned int *clock_set)
2015 unsigned int *clock_set)
2016{ 2013{
2017 cycle_t interval = tk->cycle_interval << shift; 2014 u64 interval = tk->cycle_interval << shift;
2018 u64 raw_nsecs; 2015 u64 raw_nsecs;
2019 2016
2020 /* If the offset is smaller than a shifted interval, do nothing */ 2017 /* If the offset is smaller than a shifted interval, do nothing */
@@ -2055,7 +2052,7 @@ void update_wall_time(void)
2055{ 2052{
2056 struct timekeeper *real_tk = &tk_core.timekeeper; 2053 struct timekeeper *real_tk = &tk_core.timekeeper;
2057 struct timekeeper *tk = &shadow_timekeeper; 2054 struct timekeeper *tk = &shadow_timekeeper;
2058 cycle_t offset; 2055 u64 offset;
2059 int shift = 0, maxshift; 2056 int shift = 0, maxshift;
2060 unsigned int clock_set = 0; 2057 unsigned int clock_set = 0;
2061 unsigned long flags; 2058 unsigned long flags;
diff --git a/kernel/time/timekeeping_internal.h b/kernel/time/timekeeping_internal.h
index 5be76270ec4a..9a18f121f399 100644
--- a/kernel/time/timekeeping_internal.h
+++ b/kernel/time/timekeeping_internal.h
@@ -13,9 +13,9 @@ extern void tk_debug_account_sleep_time(struct timespec64 *t);
13#endif 13#endif
14 14
15#ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE 15#ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE
16static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask) 16static inline u64 clocksource_delta(u64 now, u64 last, u64 mask)
17{ 17{
18 cycle_t ret = (now - last) & mask; 18 u64 ret = (now - last) & mask;
19 19
20 /* 20 /*
21 * Prevent time going backwards by checking the MSB of mask in 21 * Prevent time going backwards by checking the MSB of mask in
@@ -24,7 +24,7 @@ static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
24 return ret & ~(mask >> 1) ? 0 : ret; 24 return ret & ~(mask >> 1) ? 0 : ret;
25} 25}
26#else 26#else
27static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask) 27static inline u64 clocksource_delta(u64 now, u64 last, u64 mask)
28{ 28{
29 return (now - last) & mask; 29 return (now - last) & mask;
30} 30}
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1f0f547c54da..eb230f06ba41 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2847,7 +2847,7 @@ static void ftrace_shutdown_sysctl(void)
2847 } 2847 }
2848} 2848}
2849 2849
2850static cycle_t ftrace_update_time; 2850static u64 ftrace_update_time;
2851unsigned long ftrace_update_tot_cnt; 2851unsigned long ftrace_update_tot_cnt;
2852 2852
2853static inline int ops_traces_mod(struct ftrace_ops *ops) 2853static inline int ops_traces_mod(struct ftrace_ops *ops)
@@ -2894,7 +2894,7 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
2894{ 2894{
2895 struct ftrace_page *pg; 2895 struct ftrace_page *pg;
2896 struct dyn_ftrace *p; 2896 struct dyn_ftrace *p;
2897 cycle_t start, stop; 2897 u64 start, stop;
2898 unsigned long update_cnt = 0; 2898 unsigned long update_cnt = 0;
2899 unsigned long rec_flags = 0; 2899 unsigned long rec_flags = 0;
2900 int i; 2900 int i;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 66f829c47bec..d7449783987a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -236,7 +236,7 @@ static int __init set_tracepoint_printk(char *str)
236} 236}
237__setup("tp_printk", set_tracepoint_printk); 237__setup("tp_printk", set_tracepoint_printk);
238 238
239unsigned long long ns2usecs(cycle_t nsec) 239unsigned long long ns2usecs(u64 nsec)
240{ 240{
241 nsec += 500; 241 nsec += 500;
242 do_div(nsec, 1000); 242 do_div(nsec, 1000);
@@ -573,7 +573,7 @@ int trace_pid_write(struct trace_pid_list *filtered_pids,
573 return read; 573 return read;
574} 574}
575 575
576static cycle_t buffer_ftrace_now(struct trace_buffer *buf, int cpu) 576static u64 buffer_ftrace_now(struct trace_buffer *buf, int cpu)
577{ 577{
578 u64 ts; 578 u64 ts;
579 579
@@ -587,7 +587,7 @@ static cycle_t buffer_ftrace_now(struct trace_buffer *buf, int cpu)
587 return ts; 587 return ts;
588} 588}
589 589
590cycle_t ftrace_now(int cpu) 590u64 ftrace_now(int cpu)
591{ 591{
592 return buffer_ftrace_now(&global_trace.trace_buffer, cpu); 592 return buffer_ftrace_now(&global_trace.trace_buffer, cpu);
593} 593}
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index c2234494f40c..1ea51ab53edf 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -159,7 +159,7 @@ struct trace_array_cpu {
159 unsigned long policy; 159 unsigned long policy;
160 unsigned long rt_priority; 160 unsigned long rt_priority;
161 unsigned long skipped_entries; 161 unsigned long skipped_entries;
162 cycle_t preempt_timestamp; 162 u64 preempt_timestamp;
163 pid_t pid; 163 pid_t pid;
164 kuid_t uid; 164 kuid_t uid;
165 char comm[TASK_COMM_LEN]; 165 char comm[TASK_COMM_LEN];
@@ -177,7 +177,7 @@ struct trace_buffer {
177 struct trace_array *tr; 177 struct trace_array *tr;
178 struct ring_buffer *buffer; 178 struct ring_buffer *buffer;
179 struct trace_array_cpu __percpu *data; 179 struct trace_array_cpu __percpu *data;
180 cycle_t time_start; 180 u64 time_start;
181 int cpu; 181 int cpu;
182}; 182};
183 183
@@ -689,7 +689,7 @@ static inline void __trace_stack(struct trace_array *tr, unsigned long flags,
689} 689}
690#endif /* CONFIG_STACKTRACE */ 690#endif /* CONFIG_STACKTRACE */
691 691
692extern cycle_t ftrace_now(int cpu); 692extern u64 ftrace_now(int cpu);
693 693
694extern void trace_find_cmdline(int pid, char comm[]); 694extern void trace_find_cmdline(int pid, char comm[]);
695extern void trace_event_follow_fork(struct trace_array *tr, bool enable); 695extern void trace_event_follow_fork(struct trace_array *tr, bool enable);
@@ -736,7 +736,7 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
736#endif /* CONFIG_FTRACE_STARTUP_TEST */ 736#endif /* CONFIG_FTRACE_STARTUP_TEST */
737 737
738extern void *head_page(struct trace_array_cpu *data); 738extern void *head_page(struct trace_array_cpu *data);
739extern unsigned long long ns2usecs(cycle_t nsec); 739extern unsigned long long ns2usecs(u64 nsec);
740extern int 740extern int
741trace_vbprintk(unsigned long ip, const char *fmt, va_list args); 741trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
742extern int 742extern int
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
index 86654d7e1afe..7758bc0617cb 100644
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -298,7 +298,7 @@ static void irqsoff_print_header(struct seq_file *s)
298/* 298/*
299 * Should this new latency be reported/recorded? 299 * Should this new latency be reported/recorded?
300 */ 300 */
301static bool report_latency(struct trace_array *tr, cycle_t delta) 301static bool report_latency(struct trace_array *tr, u64 delta)
302{ 302{
303 if (tracing_thresh) { 303 if (tracing_thresh) {
304 if (delta < tracing_thresh) 304 if (delta < tracing_thresh)
@@ -316,7 +316,7 @@ check_critical_timing(struct trace_array *tr,
316 unsigned long parent_ip, 316 unsigned long parent_ip,
317 int cpu) 317 int cpu)
318{ 318{
319 cycle_t T0, T1, delta; 319 u64 T0, T1, delta;
320 unsigned long flags; 320 unsigned long flags;
321 int pc; 321 int pc;
322 322
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
index 5d0bb025bb21..ddec53b67646 100644
--- a/kernel/trace/trace_sched_wakeup.c
+++ b/kernel/trace/trace_sched_wakeup.c
@@ -358,7 +358,7 @@ static void wakeup_print_header(struct seq_file *s)
358/* 358/*
359 * Should this new latency be reported/recorded? 359 * Should this new latency be reported/recorded?
360 */ 360 */
361static bool report_latency(struct trace_array *tr, cycle_t delta) 361static bool report_latency(struct trace_array *tr, u64 delta)
362{ 362{
363 if (tracing_thresh) { 363 if (tracing_thresh) {
364 if (delta < tracing_thresh) 364 if (delta < tracing_thresh)
@@ -440,7 +440,7 @@ probe_wakeup_sched_switch(void *ignore, bool preempt,
440 struct task_struct *prev, struct task_struct *next) 440 struct task_struct *prev, struct task_struct *next)
441{ 441{
442 struct trace_array_cpu *data; 442 struct trace_array_cpu *data;
443 cycle_t T0, T1, delta; 443 u64 T0, T1, delta;
444 unsigned long flags; 444 unsigned long flags;
445 long disabled; 445 long disabled;
446 int cpu; 446 int cpu;
diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
index 38990a77d7b7..c6994ebb4567 100644
--- a/sound/hda/hdac_stream.c
+++ b/sound/hda/hdac_stream.c
@@ -465,7 +465,7 @@ int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
465} 465}
466EXPORT_SYMBOL_GPL(snd_hdac_stream_set_params); 466EXPORT_SYMBOL_GPL(snd_hdac_stream_set_params);
467 467
468static cycle_t azx_cc_read(const struct cyclecounter *cc) 468static u64 azx_cc_read(const struct cyclecounter *cc)
469{ 469{
470 struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc); 470 struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc);
471 471
@@ -473,7 +473,7 @@ static cycle_t azx_cc_read(const struct cyclecounter *cc)
473} 473}
474 474
475static void azx_timecounter_init(struct hdac_stream *azx_dev, 475static void azx_timecounter_init(struct hdac_stream *azx_dev,
476 bool force, cycle_t last) 476 bool force, u64 last)
477{ 477{
478 struct timecounter *tc = &azx_dev->tc; 478 struct timecounter *tc = &azx_dev->tc;
479 struct cyclecounter *cc = &azx_dev->cc; 479 struct cyclecounter *cc = &azx_dev->cc;
@@ -523,7 +523,7 @@ void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
523 struct snd_pcm_runtime *runtime = azx_dev->substream->runtime; 523 struct snd_pcm_runtime *runtime = azx_dev->substream->runtime;
524 struct hdac_stream *s; 524 struct hdac_stream *s;
525 bool inited = false; 525 bool inited = false;
526 cycle_t cycle_last = 0; 526 u64 cycle_last = 0;
527 int i = 0; 527 int i = 0;
528 528
529 list_for_each_entry(s, &bus->stream_list, list) { 529 list_for_each_entry(s, &bus->stream_list, list) {
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index ae95fc0e3214..97b657adb3bd 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -39,7 +39,7 @@ void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu)
39 vcpu->arch.timer_cpu.active_cleared_last = false; 39 vcpu->arch.timer_cpu.active_cleared_last = false;
40} 40}
41 41
42static cycle_t kvm_phys_timer_read(void) 42static u64 kvm_phys_timer_read(void)
43{ 43{
44 return timecounter->cc->read(timecounter->cc); 44 return timecounter->cc->read(timecounter->cc);
45} 45}
@@ -102,7 +102,7 @@ static void kvm_timer_inject_irq_work(struct work_struct *work)
102 102
103static u64 kvm_timer_compute_delta(struct kvm_vcpu *vcpu) 103static u64 kvm_timer_compute_delta(struct kvm_vcpu *vcpu)
104{ 104{
105 cycle_t cval, now; 105 u64 cval, now;
106 106
107 cval = vcpu->arch.timer_cpu.cntv_cval; 107 cval = vcpu->arch.timer_cpu.cntv_cval;
108 now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; 108 now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff;
@@ -155,7 +155,7 @@ static bool kvm_timer_irq_can_fire(struct kvm_vcpu *vcpu)
155bool kvm_timer_should_fire(struct kvm_vcpu *vcpu) 155bool kvm_timer_should_fire(struct kvm_vcpu *vcpu)
156{ 156{
157 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu; 157 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
158 cycle_t cval, now; 158 u64 cval, now;
159 159
160 if (!kvm_timer_irq_can_fire(vcpu)) 160 if (!kvm_timer_irq_can_fire(vcpu))
161 return false; 161 return false;