On 8/9/21 3:10 AM, Daniel Henrique Barboza wrote:
+/* + * Set arbitrarily based on clock-frequency values used in PNV + * and SPAPR code. + */ +#define PPC_CPU_FREQ 1000000000static uint64_t get_cycles(uint64_t icount_delta){ - /* Placeholder value */ - return icount_delta * 4; + return muldiv64(icount_to_ns(icount_delta), PPC_CPU_FREQ, + NANOSECONDS_PER_SECOND);
So, unless you're going to do something real, you might as well just return icount_to_ns, and skip all of the no-op scaling.
r~