linux/include/ufs
Avri Altman f453c45152 scsi: ufs: core: Introduce a new clock_gating lock
[ Upstream commit 209f4e43b8 ]

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>
Stable-dep-of: 839a74b564 ("scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-02-21 14:01:39 +01:00
..
ufs.h scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions 2025-02-17 10:05:12 +01:00
ufs_quirks.h scsi: ufs: core: Remove HPB support 2023-07-23 16:40:39 -04:00
ufshcd.h scsi: ufs: core: Introduce a new clock_gating lock 2025-02-21 14:01:39 +01:00
ufshci.h SCSI misc on 20240919 2024-09-19 11:28:51 +02:00
unipro.h scsi: ufs: ufs-sysfs: Expose UFS power info 2023-11-15 10:23:55 -05:00