The PSL timebase synchronization is seemingly failing for
configuration not including VIRT_CPU_ACCOUNTING_NATIVE. The driver
shows the following trace in dmesg:
PSL: Timebase sync: giving up!
The PSL timebase register is actually syncing correctly, but the cxl
driver is not detecting it. Fix is to use the proper timebase-to-time
conversion.
Signed-off-by: Frederic Barrat <[email protected]>
Cc: <[email protected]> # 4.3+
Acked-by: Michael Neuling <[email protected]>
Reviewed-by: Matthew R. Ochs <[email protected]>
Acked-by: Ian Munsie <[email protected]>
Reviewed-by: Andrew Donnellan <[email protected]>
Reviewed-by: Vaibhav Jain <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
delta = mftb() - psl_tb;
if (delta < 0)
delta = -delta;
- } while (cputime_to_usecs(delta) > 16);
+ } while (tb_to_ns(delta) > 16000);
return 0;
}