diff -drupN a/include/linux/clocksource.h b/include/linux/clocksource.h --- a/include/linux/clocksource.h 2018-08-06 17:23:04.000000000 +0300 +++ b/include/linux/clocksource.h 2022-06-12 05:28:14.000000000 +0300 @@ -117,7 +117,7 @@ struct clocksource { #define CLOCK_SOURCE_RESELECT 0x100 /* simplify initialization of mask field */ -#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) +#define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0) static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from) {