Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
* [PATCH] remoteproc: xlnx: allow single core use in split mode
@ 2025-06-09 22:46 Tanmay Shah
  2025-06-10  1:10 ` Peng Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Tanmay Shah @ 2025-06-09 22:46 UTC (permalink / raw)
  To: andersson, mathieu.poirier; +Cc: linux-remoteproc, linux-kernel, Tanmay Shah

It's a valid use case to have only one core enabled in cluster in split
mode. Remove exact core count expecatation from the driver.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
---
 drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index 1af89782e116..f314dd5bdb26 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -1339,9 +1339,6 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster)
 	if (core_count == 0) {
 		dev_err(dev, "Invalid number of r5 cores %d", core_count);
 		return -EINVAL;
-	} else if (cluster_mode == SPLIT_MODE && core_count != 2) {
-		dev_err(dev, "Invalid number of r5 cores for split mode\n");
-		return -EINVAL;
 	} else if (cluster_mode == LOCKSTEP_MODE && core_count == 2) {
 		dev_warn(dev, "Only r5 core0 will be used\n");
 		core_count = 1;

base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a
-- 
2.34.1


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

* RE: [PATCH] remoteproc: xlnx: allow single core use in split mode
  2025-06-09 22:46 [PATCH] remoteproc: xlnx: allow single core use in split mode Tanmay Shah
@ 2025-06-10  1:10 ` Peng Fan
  2025-06-10 18:27   ` Tanmay Shah
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Fan @ 2025-06-10  1:10 UTC (permalink / raw)
  To: Tanmay Shah, andersson@kernel.org, mathieu.poirier@linaro.org
  Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org

> Subject: [PATCH] remoteproc: xlnx: allow single core use in split mode
> 
> It's a valid use case to have only one core enabled in cluster in split
> mode. Remove exact core count expecatation from the driver.
> 
> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
> ---
>  drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c
> b/drivers/remoteproc/xlnx_r5_remoteproc.c
> index 1af89782e116..f314dd5bdb26 100644
> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
> @@ -1339,9 +1339,6 @@ static int zynqmp_r5_cluster_init(struct
> zynqmp_r5_cluster *cluster)
>  	if (core_count == 0) {

"if ((count == 0 || (count > 2))"
should be used to here. 

>  		dev_err(dev, "Invalid number of r5 cores %d",
> core_count);
>  		return -EINVAL;
> -	} else if (cluster_mode == SPLIT_MODE && core_count != 2) {
> -		dev_err(dev, "Invalid number of r5 cores for split
> mode\n");
> -		return -EINVAL;


Then it is safe to drop this code piece, otherwise if hacked devicetree
being used with 3 r5 cores included, things will go wrong.

Regards,
Peng
>  	} else if (cluster_mode == LOCKSTEP_MODE && core_count ==
> 2) {
>  		dev_warn(dev, "Only r5 core0 will be used\n");
>  		core_count = 1;
> 
> base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a
> --
> 2.34.1
> 


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

* Re: [PATCH] remoteproc: xlnx: allow single core use in split mode
  2025-06-10  1:10 ` Peng Fan
@ 2025-06-10 18:27   ` Tanmay Shah
  0 siblings, 0 replies; 3+ messages in thread
From: Tanmay Shah @ 2025-06-10 18:27 UTC (permalink / raw)
  To: Peng Fan, andersson@kernel.org, mathieu.poirier@linaro.org
  Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org


Hello,

Thanks for your reviews.

On 6/9/25 8:10 PM, Peng Fan wrote:
>> Subject: [PATCH] remoteproc: xlnx: allow single core use in split mode
>>
>> It's a valid use case to have only one core enabled in cluster in split
>> mode. Remove exact core count expecatation from the driver.
>>
>> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
>> ---
>>   drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c
>> b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> index 1af89782e116..f314dd5bdb26 100644
>> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
>> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> @@ -1339,9 +1339,6 @@ static int zynqmp_r5_cluster_init(struct
>> zynqmp_r5_cluster *cluster)
>>   	if (core_count == 0) {
> 
> "if ((count == 0 || (count > 2))"
> should be used to here.
> 

That's a fair ask. I will fix it.

>>   		dev_err(dev, "Invalid number of r5 cores %d",
>> core_count);
>>   		return -EINVAL;
>> -	} else if (cluster_mode == SPLIT_MODE && core_count != 2) {
>> -		dev_err(dev, "Invalid number of r5 cores for split
>> mode\n");
>> -		return -EINVAL;
> 
> 
> Then it is safe to drop this code piece, otherwise if hacked devicetree
> being used with 3 r5 cores included, things will go wrong.
> 
> Regards,
> Peng
>>   	} else if (cluster_mode == LOCKSTEP_MODE && core_count ==
>> 2) {
>>   		dev_warn(dev, "Only r5 core0 will be used\n");
>>   		core_count = 1;
>>
>> base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a
>> --
>> 2.34.1
>>
> 


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

end of thread, other threads:[~2025-06-10 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 22:46 [PATCH] remoteproc: xlnx: allow single core use in split mode Tanmay Shah
2025-06-10  1:10 ` Peng Fan
2025-06-10 18:27   ` Tanmay Shah

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