Skip to content

Commit 3ddc76d

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer type cleanups from Thomas Gleixner: "This series does a tree wide cleanup of types related to timers/timekeeping. - Get rid of cycles_t and use a plain u64. The type is not really helpful and caused more confusion than clarity - Get rid of the ktime union. The union has become useless as we use the scalar nanoseconds storage unconditionally now. The 32bit timespec alike storage got removed due to the Y2038 limitations some time ago. That leaves the odd union access around for no reason. Clean it up. Both changes have been done with coccinelle and a small amount of manual mopping up" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ktime: Get rid of ktime_equal() ktime: Cleanup ktime_set() usage ktime: Get rid of the union clocksource: Use a plain u64 instead of cycle_t
2 parents b272f73 + 1f3a8e4 commit 3ddc76d

File tree

227 files changed

+604
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+604
-665
lines changed

arch/alpha/kernel/time.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ init_rtc_clockevent(void)
133133
* The QEMU clock as a clocksource primitive.
134134
*/
135135

136-
static cycle_t
136+
static u64
137137
qemu_cs_read(struct clocksource *cs)
138138
{
139139
return qemu_get_vmtime();
@@ -260,7 +260,7 @@ common_init_rtc(void)
260260
* use this method when WTINT is in use.
261261
*/
262262

263-
static cycle_t read_rpcc(struct clocksource *cs)
263+
static u64 read_rpcc(struct clocksource *cs)
264264
{
265265
return rpcc();
266266
}

arch/arm/mach-davinci/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void __init timer_init(void)
268268
/*
269269
* clocksource
270270
*/
271-
static cycle_t read_cycles(struct clocksource *cs)
271+
static u64 read_cycles(struct clocksource *cs)
272272
{
273273
struct timer_s *t = &timers[TID_CLOCKSOURCE];
274274

arch/arm/mach-ep93xx/timer-ep93xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ static u64 notrace ep93xx_read_sched_clock(void)
5959
return ret;
6060
}
6161

62-
cycle_t ep93xx_clocksource_read(struct clocksource *c)
62+
u64 ep93xx_clocksource_read(struct clocksource *c)
6363
{
6464
u64 ret;
6565

6666
ret = readl(EP93XX_TIMER4_VALUE_LOW);
6767
ret |= ((u64) (readl(EP93XX_TIMER4_VALUE_HIGH) & 0xff) << 32);
68-
return (cycle_t) ret;
68+
return (u64) ret;
6969
}
7070

7171
static int ep93xx_clkevt_set_next_event(unsigned long next,

arch/arm/mach-footbridge/dc21285-timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "common.h"
2121

22-
static cycle_t cksrc_dc21285_read(struct clocksource *cs)
22+
static u64 cksrc_dc21285_read(struct clocksource *cs)
2323
{
2424
return cs->mask - *CSR_TIMER2_VALUE;
2525
}

arch/arm/mach-ixp4xx/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static u64 notrace ixp4xx_read_sched_clock(void)
493493
* clocksource
494494
*/
495495

496-
static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
496+
static u64 ixp4xx_clocksource_read(struct clocksource *c)
497497
{
498498
return *IXP4XX_OSTS;
499499
}

arch/arm/mach-mmp/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static struct clock_event_device ckevt = {
144144
.set_state_oneshot = timer_set_shutdown,
145145
};
146146

147-
static cycle_t clksrc_read(struct clocksource *cs)
147+
static u64 clksrc_read(struct clocksource *cs)
148148
{
149149
return timer_read();
150150
}

arch/arm/mach-omap2/timer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ static bool use_gptimer_clksrc __initdata;
369369
/*
370370
* clocksource
371371
*/
372-
static cycle_t clocksource_read_cycles(struct clocksource *cs)
372+
static u64 clocksource_read_cycles(struct clocksource *cs)
373373
{
374-
return (cycle_t)__omap_dm_timer_read_counter(&clksrc,
374+
return (u64)__omap_dm_timer_read_counter(&clksrc,
375375
OMAP_TIMER_NONPOSTED);
376376
}
377377

arch/arm/plat-iop/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/*
3939
* IOP clocksource (free-running timer 1).
4040
*/
41-
static cycle_t notrace iop_clocksource_read(struct clocksource *unused)
41+
static u64 notrace iop_clocksource_read(struct clocksource *unused)
4242
{
4343
return 0xffffffffu - read_tcr1();
4444
}

arch/avr32/kernel/time.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
static bool disable_cpu_idle_poll;
2222

23-
static cycle_t read_cycle_count(struct clocksource *cs)
23+
static u64 read_cycle_count(struct clocksource *cs)
2424
{
25-
return (cycle_t)sysreg_read(COUNT);
25+
return (u64)sysreg_read(COUNT);
2626
}
2727

2828
/*

arch/blackfin/kernel/time-ts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#if defined(CONFIG_CYCLES_CLOCKSOURCE)
2828

29-
static notrace cycle_t bfin_read_cycles(struct clocksource *cs)
29+
static notrace u64 bfin_read_cycles(struct clocksource *cs)
3030
{
3131
#ifdef CONFIG_CPU_FREQ
3232
return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
@@ -80,7 +80,7 @@ void __init setup_gptimer0(void)
8080
enable_gptimers(TIMER0bit);
8181
}
8282

83-
static cycle_t bfin_read_gptimer0(struct clocksource *cs)
83+
static u64 bfin_read_gptimer0(struct clocksource *cs)
8484
{
8585
return bfin_read_TIMER0_COUNTER();
8686
}

0 commit comments

Comments
 (0)