Re: [PATCH v1] ufs: core: fix lockdep warning of clk_scaling_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/22/22 02:53, peter.wang@xxxxxxxxxxxx wrote:
This patch only release write lock of clk_scaling_lock before
ufshcd_wb_toggle.

The above is not clear to me. Please make the above more clear.

Additionally, patches must be signed before these can be merged upstream. Where is your Signed-off-by?

-	/* Enable Write Booster if we have scaled up else disable it */
-	downgrade_write(&hba->clk_scaling_lock);
-	is_writelock = false;
-	ufshcd_wb_toggle(hba, scale_up);
+	wb_toggle = true;
out_unprepare:
-	ufshcd_clock_scaling_unprepare(hba, is_writelock);
+	ufshcd_clock_scaling_unprepare(hba);
+
+	/* Enable Write Booster if we have scaled up else disable it */
+	if (wb_toggle)
+		ufshcd_wb_toggle(hba, scale_up);
+
  	return ret;
  }

The patch description should mention that this patch changes the ufshcd_wb_toggle() call: before this patch clk_scaling_lock was held in reader mode during the ufshcd_wb_toggle() call and with this patch applied clk_scaling_lock is not held while ufshcd_wb_toggle() is called. I'm missing an explanation of why this change is safe.

Thanks,

Bart.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux