mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] Untie the host lock entanglement - part 1
@ 2024-10-21 12:03 Avri Altman
  2024-10-21 12:03 ` [PATCH 1/4] scsi: ufs: core: Introduce a new host register lock Avri Altman
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Avri Altman @ 2024-10-21 12:03 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, linux-kernel, Bart Van Assche, Avri Altman

While trying to simplify the ufs core driver with the guard() macro [1],
Bart made note of the abuse of the scsi host lock in the ufs driver.
Indeed, the host lock is deeply entangled in various flows across the
driver, as if it was some occasional default synchronization mean.

Here is the first part of defusing it, replace some of its occurrences
of host registers accesses, with a dedicated host register lock. 

Doing this in phases seems like a reasonable approach, given the myriad
use.


[1] https://lore.kernel.org/linux-scsi/0b031b8f-c07c-42ef-af93-7336439d3c37@acm.org/

Avri Altman (4):
  scsi: ufs: core: Introduce a new host register lock
  scsi: ufs: core: Use reg_lock to protect UTMRLCLR
  scsi: ufs: core: Use reg_lock to protect UTRLCLR
  scsi: ufs: core: Use reg_lock to protect HCE register

 drivers/ufs/core/ufshcd.c | 38 ++++++++++++++++++++++++--------------
 include/ufs/ufshcd.h      |  3 +++
 2 files changed, 27 insertions(+), 14 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-10-22  6:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-21 12:03 [PATCH 0/4] Untie the host lock entanglement - part 1 Avri Altman
2024-10-21 12:03 ` [PATCH 1/4] scsi: ufs: core: Introduce a new host register lock Avri Altman
2024-10-21 18:35   ` Bart Van Assche
2024-10-22  6:02     ` Avri Altman
2024-10-21 12:03 ` [PATCH 2/4] scsi: ufs: core: Use reg_lock to protect UTMRLCLR Avri Altman
2024-10-21 20:25   ` Bart Van Assche
2024-10-22  6:02     ` Avri Altman
2024-10-21 12:03 ` [PATCH 3/4] scsi: ufs: core: Use reg_lock to protect UTRLCLR Avri Altman
2024-10-21 20:26   ` Bart Van Assche
2024-10-22  6:03     ` Avri Altman
2024-10-21 12:03 ` [PATCH 4/4] scsi: ufs: core: Use reg_lock to protect HCE register Avri Altman
2024-10-21 20:02   ` Bart Van Assche
2024-10-22  6:01     ` Avri Altman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®