|
@@ -19,7 +19,7 @@ u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc)
|
|
u64 quot, rem;
|
|
u64 quot, rem;
|
|
|
|
|
|
quot = cyc >> tc->time_shift;
|
|
quot = cyc >> tc->time_shift;
|
|
- rem = cyc & ((1 << tc->time_shift) - 1);
|
|
|
|
|
|
+ rem = cyc & (((u64)1 << tc->time_shift) - 1);
|
|
return tc->time_zero + quot * tc->time_mult +
|
|
return tc->time_zero + quot * tc->time_mult +
|
|
((rem * tc->time_mult) >> tc->time_shift);
|
|
((rem * tc->time_mult) >> tc->time_shift);
|
|
}
|
|
}
|