On Sun, Mar 17, 2024 at 10:18:25PM -0500, Bjorn Andersson wrote:
On Thu, Feb 15, 2024 at 10:55:44AM +0530, Maulik Shah wrote:
Each RPMh VRM accelerator resource has 3 or 4 contiguous 4-byte aligned addresses associated with it. These control voltage, enable state, mode, and in legacy targets, voltage headroom. The current in-flight request checking logic looks for exact address matches. Requests for different addresses of the same RPMh resource as thus not detected as in-flight.
Add new cmd-db API cmd_db_match_resource_addr() to enhance the in-flight request check for VRM requests by ignoring the address offset.
This ensures that only one request is allowed to be in-flight for a given VRM resource. This is needed to avoid scenarios where request commands are carried out by RPMh hardware out-of-order leading to LDO regulator over-current protection triggering.
Fixes: 658628e7ef78 ("drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs") cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio konrad.dybcio@linaro.org Tested-by: Elliot Berman quic_eberman@quicinc.com # sm8650-qrd Signed-off-by: Maulik Shah quic_mkshah@quicinc.com
Changes in v4:
- Simplify cmd_db_match_resource_addr()
- Remove unrelated changes to newly added logic
- Update function description comments
You changed things, but retained Konrad's Reviewed-by...
- Replace Signed-off-by: with Tested-by: from Elliot
Did Elliot test v4, or did you just translate his incorrect(?) s-o-b from v1 into a tested-by?
We're about to write into the git history that Elliot says this version is tested to the best of his abilities...
No, I asked for it:
https://lore.kernel.org/all/20240214105605460-0800.eberman@hu-eberman-lv.qua...