scsi: ufs: core: Use local_clock() for debugging timestamps
authorDaniil Lunev <dlunev@chromium.org>
Wed, 3 Aug 2022 20:50:34 +0000 (06:50 +1000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 23 Aug 2022 03:03:30 +0000 (23:03 -0400)
commit0f85e74756b5e85a0de6dce7d8c07f0b4e1f7726
tree524738bf90394faf2f5b537582045836aaa62680
parentb7dbc686f60b28d0843ed572f8aa59c3e76e142b
scsi: ufs: core: Use local_clock() for debugging timestamps

CLOCK_MONOTONIC is not advanced when the system is in suspend. This becomes
problematic when debugging issues related to suspend-resume: the timestamps
printed by ufshcd_print_trs can not be correlated with dmesg entries, which
are timestamped with local_clock().

Change the used clock to local_clock() for the informational timestamp
variables and adds mirroring *_local_clock instances for variables used in
subsequent derevations (to not change the semantics of those derevations).

Link: https://lore.kernel.org/r/20220804065019.v5.1.I699244ea7efbd326a34a6dfd9b5a31e78400cf68@changeid
Acked-by: Stanley Chu <stanley.chu@mediatek.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Daniil Lunev <dlunev@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c
include/ufs/ufshcd.h