cxl: Fix PSL timebase synchronization detection
PATCH 1/1 cxl: Fix PSL timebase synchronization detection
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.
--- drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/cxl/pci.c +1 -1
@@ -415,7 +415,7 @@ static int cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev) delta =mftb () - psl_tb;if (delta <0 ) delta = -delta; - }while (cputime_to_usecs (delta) >16 ); + }while (tb_to_ns (delta) >16000 );return 0 ; }
Signature · 1 line
1.9.1
Quoted 10 lines · Frederic Barrat
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!
=20
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.
=20Signed-off-by Frederic Barrat <[email protected]>
Looks good!
Quoted 19 lines
Cc <[email protected]> # 4.3+--- drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)=20
drivers/misc/cxl/pci.c +1
-1@@ -415,7 +415,7 @@ static int cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev) delta =3D mftb() - psl_tb;if (delta <0 ) delta =3D -delta; - }while (cputime_to_usecs (delta) >16 ); + }while (tb_to_ns (delta) >16000 );=20
return 0;
}
Quoted 11 lines · Frederic Barrat
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+
Signature · 3 lines
Andrew Donnellan Software Engineer, OzLabs [email protected] Australia Development Lab, Canberra +61 2 6201 8874 (work) IBM Australia Limited
Quoted 11 lines · Frederic Barrat
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+
Michael Ellerman
AppliedQuoted 9 lines · Frederic Barrat
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.
Quoted 7 lines
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]>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/923adb1646d5ba739d2a1e63ee
cheers