Skip to contentSkip to conversation

remoteproc: xlnx: allow single core use in split mode

PATCH Superseded Tanmay Shah 2 participants 3 messages Jun 9, 2025 – Jun 10, 2025 Remote processor (remoteproc)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -3
index 1af89782e116..f314dd5bdb26 100644
@@ -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

Signature · 1 line
2.34.1
#1 lore raw
Quoted 16 lines

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.

---
 drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -0
index 1af89782e116..f314dd5bdb26 100644

drivers/remoteproc/xlnx_r5_remoteproc.c static int zynqmp_r5_cluster_init(struct · line 1340

Quoted 2 lines
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -0
@@ -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.

drivers/remoteproc/xlnx_r5_remoteproc.c static int zynqmp_r5_cluster_init(struct · line 1347

Quoted 7 lines
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -3
 		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

Quoted 9 lines

} else if (cluster_mode == LOCKSTEP_MODE && core_count ==
2) {

drivers/remoteproc/xlnx_r5_remoteproc.c +0 -0
 		dev_warn(dev, "Only r5 core0 will be used\n");
 		core_count = 1;

base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a --
2.34.1

#2 lore raw

Hello,

Thanks for your reviews.

Quoted 10 lines · Peng Fan
Quoted 10 lines

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.

---
  drivers/remoteproc/xlnx_r5_remoteproc.c | 3 ---
  1 file changed, 3 deletions(-)
Quoted 12 lines

drivers/remoteproc/xlnx_r5_remoteproc.c static int zynqmp_r5_cluster_init(struct · line 1340

Quoted 8 lines
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -0
index 1af89782e116..f314dd5bdb26 100644
@@ -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.

Quoted 24 lines

drivers/remoteproc/xlnx_r5_remoteproc.c static int zynqmp_r5_cluster_init(struct · line 1347

Quoted 7 lines
drivers/remoteproc/xlnx_r5_remoteproc.c +0 -3
  		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

Quoted 9 lines

} 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