clocksource: Use a plain u64 instead of cycle_t
There is no point in having an extra type for extra confusion. u64 is unambiguous. Conversion was done with the following coccinelle script: @rem@ @@ -typedef u64 cycle_t; @fix@ typedef cycle_t; @@ -cycle_t +u64 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
/* simplify initialization of mask field */
|
||||
#define CYCLECOUNTER_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
|
||||
#define CYCLECOUNTER_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
|
||||
|
||||
/**
|
||||
* struct cyclecounter - hardware abstraction for a free running counter
|
||||
@@ -37,8 +37,8 @@
|
||||
* @shift: cycle to nanosecond divisor (power of two)
|
||||
*/
|
||||
struct cyclecounter {
|
||||
cycle_t (*read)(const struct cyclecounter *cc);
|
||||
cycle_t mask;
|
||||
u64 (*read)(const struct cyclecounter *cc);
|
||||
u64 mask;
|
||||
u32 mult;
|
||||
u32 shift;
|
||||
};
|
||||
@@ -63,7 +63,7 @@ struct cyclecounter {
|
||||
*/
|
||||
struct timecounter {
|
||||
const struct cyclecounter *cc;
|
||||
cycle_t cycle_last;
|
||||
u64 cycle_last;
|
||||
u64 nsec;
|
||||
u64 mask;
|
||||
u64 frac;
|
||||
@@ -77,7 +77,7 @@ struct timecounter {
|
||||
* @frac: pointer to storage for the fractional nanoseconds.
|
||||
*/
|
||||
static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
|
||||
cycle_t cycles, u64 mask, u64 *frac)
|
||||
u64 cycles, u64 mask, u64 *frac)
|
||||
{
|
||||
u64 ns = (u64) cycles;
|
||||
|
||||
@@ -134,6 +134,6 @@ extern u64 timecounter_read(struct timecounter *tc);
|
||||
* in the past.
|
||||
*/
|
||||
extern u64 timecounter_cyc2time(struct timecounter *tc,
|
||||
cycle_t cycle_tstamp);
|
||||
u64 cycle_tstamp);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user