diff mbox series

firmware: qcom: tzmem: blacklist more platforms for SHM Bridge

Message ID 20240704-shmbridge-blacklist-v1-1-14b027b3b2dc@linaro.org (mailing list archive)
State Accepted
Commit 55751d3e9e96d5d64dc6ebb5bbdf70f45098f279
Headers show
Series firmware: qcom: tzmem: blacklist more platforms for SHM Bridge | expand

Commit Message

Dmitry Baryshkov July 4, 2024, 11:12 a.m. UTC
The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
corresponding platforms using SoC-level compat string. If later it's
found that the bad behaviour is limited just to the particular boards
rather than SoC, the compat strings can be adjusted.

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/firmware/qcom/qcom_tzmem.c | 2 ++
 1 file changed, 2 insertions(+)


---
base-commit: 82e4255305c554b0bb18b7ccf2db86041b4c8b6e
change-id: 20240704-shmbridge-blacklist-021bd97b8a93

Best regards,

Comments

Bartosz Golaszewski July 4, 2024, 12:15 p.m. UTC | #1
On Thu, Jul 4, 2024 at 1:13 PM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
> the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
> corresponding platforms using SoC-level compat string. If later it's
> found that the bad behaviour is limited just to the particular boards
> rather than SoC, the compat strings can be adjusted.
>
> Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
> Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/firmware/qcom/qcom_tzmem.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> index 5d526753183d..c715729f071c 100644
> --- a/drivers/firmware/qcom/qcom_tzmem.c
> +++ b/drivers/firmware/qcom/qcom_tzmem.c
> @@ -78,6 +78,8 @@ static bool qcom_tzmem_using_shm_bridge;
>  /* List of machines that are known to not support SHM bridge correctly. */
>  static const char *const qcom_tzmem_blacklist[] = {
>         "qcom,sc8180x",
> +       "qcom,sdm845", /* reset in rmtfs memory assignment */
> +       "qcom,sm8150", /* reset in rmtfs memory assignment */

Like I said on IRC: both these platforms were tested at some point
during development so it's worth figuring out what changed.

Ok for disabling them for now.

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Bart

>         NULL
>  };
>
>
> ---
> base-commit: 82e4255305c554b0bb18b7ccf2db86041b4c8b6e
> change-id: 20240704-shmbridge-blacklist-021bd97b8a93
>
> Best regards,
> --
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
>
Neil Armstrong July 4, 2024, 1:17 p.m. UTC | #2
On 04/07/2024 13:12, Dmitry Baryshkov wrote:
> The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
> the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
> corresponding platforms using SoC-level compat string. If later it's
> found that the bad behaviour is limited just to the particular boards
> rather than SoC, the compat strings can be adjusted.
> 
> Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
> Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/firmware/qcom/qcom_tzmem.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> index 5d526753183d..c715729f071c 100644
> --- a/drivers/firmware/qcom/qcom_tzmem.c
> +++ b/drivers/firmware/qcom/qcom_tzmem.c
> @@ -78,6 +78,8 @@ static bool qcom_tzmem_using_shm_bridge;
>   /* List of machines that are known to not support SHM bridge correctly. */
>   static const char *const qcom_tzmem_blacklist[] = {
>   	"qcom,sc8180x",
> +	"qcom,sdm845", /* reset in rmtfs memory assignment */
> +	"qcom,sm8150", /* reset in rmtfs memory assignment */
>   	NULL
>   };
>   
> 
> ---
> base-commit: 82e4255305c554b0bb18b7ccf2db86041b4c8b6e
> change-id: 20240704-shmbridge-blacklist-021bd97b8a93
> 
> Best regards,

Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Qualcomm RB3
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8150-HDK

Thanks,
Neil
Bjorn Andersson July 4, 2024, 4:03 p.m. UTC | #3
On Thu, Jul 04, 2024 at 02:12:46PM GMT, Dmitry Baryshkov wrote:
> The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
> the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
> corresponding platforms using SoC-level compat string. If later it's
> found that the bad behaviour is limited just to the particular boards
> rather than SoC, the compat strings can be adjusted.
> 
> Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
> Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/firmware/qcom/qcom_tzmem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> index 5d526753183d..c715729f071c 100644
> --- a/drivers/firmware/qcom/qcom_tzmem.c
> +++ b/drivers/firmware/qcom/qcom_tzmem.c
> @@ -78,6 +78,8 @@ static bool qcom_tzmem_using_shm_bridge;
>  /* List of machines that are known to not support SHM bridge correctly. */
>  static const char *const qcom_tzmem_blacklist[] = {
>  	"qcom,sc8180x",
> +	"qcom,sdm845", /* reset in rmtfs memory assignment */
> +	"qcom,sm8150", /* reset in rmtfs memory assignment */

What confidence do we have in that this list is now complete?

As Bartosz says, we booted RB3 successfully with an earlier version of
this series, what changed?

Regards,
Bjorn

>  	NULL
>  };
>  
> 
> ---
> base-commit: 82e4255305c554b0bb18b7ccf2db86041b4c8b6e
> change-id: 20240704-shmbridge-blacklist-021bd97b8a93
> 
> Best regards,
> -- 
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
Neil Armstrong July 4, 2024, 4:36 p.m. UTC | #4
On 04/07/2024 18:03, Bjorn Andersson wrote:
> On Thu, Jul 04, 2024 at 02:12:46PM GMT, Dmitry Baryshkov wrote:
>> The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
>> the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
>> corresponding platforms using SoC-level compat string. If later it's
>> found that the bad behaviour is limited just to the particular boards
>> rather than SoC, the compat strings can be adjusted.
>>
>> Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
>> Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   drivers/firmware/qcom/qcom_tzmem.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
>> index 5d526753183d..c715729f071c 100644
>> --- a/drivers/firmware/qcom/qcom_tzmem.c
>> +++ b/drivers/firmware/qcom/qcom_tzmem.c
>> @@ -78,6 +78,8 @@ static bool qcom_tzmem_using_shm_bridge;
>>   /* List of machines that are known to not support SHM bridge correctly. */
>>   static const char *const qcom_tzmem_blacklist[] = {
>>   	"qcom,sc8180x",
>> +	"qcom,sdm845", /* reset in rmtfs memory assignment */
>> +	"qcom,sm8150", /* reset in rmtfs memory assignment */
> 
> What confidence do we have in that this list is now complete?

AFAIK we don't but at least we're sure with this patch, it successfully boots on:
- db410c
- db820c
- rb3
- hdk8150
- rb5
- hdk8350
- hdk8450
- qrd8550
- hdk8550
- qrd8650
- hdk8650

=> https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/pipelines/91268

Without this change it crashes on rb3 & hdk8150:
- https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/jobs/152722#L749
- https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/jobs/152723#L838

Neil

> 
> As Bartosz says, we booted RB3 successfully with an earlier version of
> this series, what changed?
> 
> Regards,
> Bjorn
> 
>>   	NULL
>>   };
>>   
>>
>> ---
>> base-commit: 82e4255305c554b0bb18b7ccf2db86041b4c8b6e
>> change-id: 20240704-shmbridge-blacklist-021bd97b8a93
>>
>> Best regards,
>> -- 
>> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>
Elliot Berman July 5, 2024, 5:40 p.m. UTC | #5
On Thu, Jul 04, 2024 at 06:36:23PM +0200, Neil Armstrong wrote:
> On 04/07/2024 18:03, Bjorn Andersson wrote:
> > On Thu, Jul 04, 2024 at 02:12:46PM GMT, Dmitry Baryshkov wrote:
> > > The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
> > > the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
> > > corresponding platforms using SoC-level compat string. If later it's
> > > found that the bad behaviour is limited just to the particular boards
> > > rather than SoC, the compat strings can be adjusted.
> > > 
> > > Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
> > > Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support")
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > >   drivers/firmware/qcom/qcom_tzmem.c | 2 ++
> > >   1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> > > index 5d526753183d..c715729f071c 100644
> > > --- a/drivers/firmware/qcom/qcom_tzmem.c
> > > +++ b/drivers/firmware/qcom/qcom_tzmem.c
> > > @@ -78,6 +78,8 @@ static bool qcom_tzmem_using_shm_bridge;
> > >   /* List of machines that are known to not support SHM bridge correctly. */
> > >   static const char *const qcom_tzmem_blacklist[] = {
> > >   	"qcom,sc8180x",
> > > +	"qcom,sdm845", /* reset in rmtfs memory assignment */
> > > +	"qcom,sm8150", /* reset in rmtfs memory assignment */
> > 
> > What confidence do we have in that this list is now complete?
> 
> AFAIK we don't but at least we're sure with this patch, it successfully boots on:
> - db410c
> - db820c
> - rb3
> - hdk8150
> - rb5
> - hdk8350
> - hdk8450
> - qrd8550
> - hdk8550
> - qrd8650
> - hdk8650
> 
> => https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/pipelines/91268
> 
> Without this change it crashes on rb3 & hdk8150:
> - https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/jobs/152722#L749
> - https://git.codelinaro.org/linaro/qcomlt/ci/staging/cdba-tester/-/jobs/152723#L838
> 
> Neil
> 
> > 
> > As Bartosz says, we booted RB3 successfully with an earlier version of
> > this series, what changed?
> > 

Is it literally same device tested? I wonder if different firmware
versions behave differently.

- Elliot
Bjorn Andersson July 6, 2024, 10:01 p.m. UTC | #6
On Thu, 04 Jul 2024 14:12:46 +0300, Dmitry Baryshkov wrote:
> The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
> the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
> corresponding platforms using SoC-level compat string. If later it's
> found that the bad behaviour is limited just to the particular boards
> rather than SoC, the compat strings can be adjusted.
> 
> 
> [...]

Applied, thanks!

[1/1] firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
      commit: 55751d3e9e96d5d64dc6ebb5bbdf70f45098f279

Best regards,
diff mbox series

Patch

diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
index 5d526753183d..c715729f071c 100644
--- a/drivers/firmware/qcom/qcom_tzmem.c
+++ b/drivers/firmware/qcom/qcom_tzmem.c
@@ -78,6 +78,8 @@  static bool qcom_tzmem_using_shm_bridge;
 /* List of machines that are known to not support SHM bridge correctly. */
 static const char *const qcom_tzmem_blacklist[] = {
 	"qcom,sc8180x",
+	"qcom,sdm845", /* reset in rmtfs memory assignment */
+	"qcom,sm8150", /* reset in rmtfs memory assignment */
 	NULL
 };