]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Introduce a new clock_gating lock
authorAvri Altman <avri.altman@wdc.com>
Sun, 24 Nov 2024 07:08:07 +0000 (09:08 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 Dec 2024 18:12:07 +0000 (13:12 -0500)
commit209f4e43b8068c24cde227f464111030430153fa
treeed483006ca2e315a622ed47d89b57fee37b12396
parent7869c6521f5715688b3d1f1c897374a68544eef0
scsi: ufs: core: Introduce a new clock_gating lock

Introduce a new clock gating lock to serialize access to some of the clock
gating members instead of the host_lock.

While at it, simplify the code with the guard() macro and co for automatic
cleanup of the new lock. There are some explicit
spin_lock_irqsave()/spin_unlock_irqrestore() snaking instances I left
behind because I couldn't make heads or tails of it.

Additionally, move the trace_ufshcd_clk_gating() call from inside the
region protected by the lock as it doesn't needs protection.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20241124070808.194860-4-avri.altman@wdc.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c
include/ufs/ufshcd.h