* [PATCH v2] remoteproc: xlnx: allow single core use in split mode @ 2025-06-10 19:27 Tanmay Shah 2025-06-11 6:53 ` Peng Fan 2025-06-13 17:18 ` Mathieu Poirier 0 siblings, 2 replies; 4+ messages in thread From: Tanmay Shah @ 2025-06-10 19:27 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> --- Change in v2: - limit core_count to max 2 drivers/remoteproc/xlnx_r5_remoteproc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index 1af89782e116..a1beaa2acc96 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -1336,12 +1336,9 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster) * and ignore core1 dt node. */ core_count = of_get_available_child_count(dev_node); - if (core_count == 0) { + if (core_count == 0 || core_count > 2) { 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] 4+ messages in thread
* Re: [PATCH v2] remoteproc: xlnx: allow single core use in split mode 2025-06-10 19:27 [PATCH v2] remoteproc: xlnx: allow single core use in split mode Tanmay Shah @ 2025-06-11 6:53 ` Peng Fan 2025-06-13 17:18 ` Mathieu Poirier 1 sibling, 0 replies; 4+ messages in thread From: Peng Fan @ 2025-06-11 6:53 UTC (permalink / raw) To: Tanmay Shah; +Cc: andersson, mathieu.poirier, linux-remoteproc, linux-kernel On Tue, Jun 10, 2025 at 12:27:38PM -0700, Tanmay Shah wrote: >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> Reviewed-by: <peng.fan@nxp.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] remoteproc: xlnx: allow single core use in split mode 2025-06-10 19:27 [PATCH v2] remoteproc: xlnx: allow single core use in split mode Tanmay Shah 2025-06-11 6:53 ` Peng Fan @ 2025-06-13 17:18 ` Mathieu Poirier 2025-06-13 18:07 ` Tanmay Shah 1 sibling, 1 reply; 4+ messages in thread From: Mathieu Poirier @ 2025-06-13 17:18 UTC (permalink / raw) To: Tanmay Shah; +Cc: andersson, linux-remoteproc, linux-kernel Good day, On Tue, Jun 10, 2025 at 12:27:38PM -0700, Tanmay Shah wrote: > 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. I suggest: "When operating in split mode, it is a valid usecase to have only one core enabled in the cluster. Remove..." > > Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> > --- > > Change in v2: > - limit core_count to max 2 > > drivers/remoteproc/xlnx_r5_remoteproc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c > index 1af89782e116..a1beaa2acc96 100644 > --- a/drivers/remoteproc/xlnx_r5_remoteproc.c > +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c > @@ -1336,12 +1336,9 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster) > * and ignore core1 dt node. > */ > core_count = of_get_available_child_count(dev_node); > - if (core_count == 0) { > + if (core_count == 0 || core_count > 2) { > 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; When thinking about the specific usecase where, in split mode, a single core is enabled - can it be either core0 or core1 or does it have to be core0? Is the code in the driver ready to handle this configuration? The inline comments you already have to explain the possible configurations need to be update to address this new usecase. Thanks, Mathieu > > base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] remoteproc: xlnx: allow single core use in split mode 2025-06-13 17:18 ` Mathieu Poirier @ 2025-06-13 18:07 ` Tanmay Shah 0 siblings, 0 replies; 4+ messages in thread From: Tanmay Shah @ 2025-06-13 18:07 UTC (permalink / raw) To: Mathieu Poirier; +Cc: andersson, linux-remoteproc, linux-kernel On 6/13/25 12:18 PM, Mathieu Poirier wrote: > Good day, > > On Tue, Jun 10, 2025 at 12:27:38PM -0700, Tanmay Shah wrote: >> 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. > > I suggest: > > "When operating in split mode, it is a valid usecase to have only one core > enabled in the cluster. Remove..." > Ack, will update commit message in next rev. >> >> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> >> --- >> >> Change in v2: >> - limit core_count to max 2 >> >> drivers/remoteproc/xlnx_r5_remoteproc.c | 5 +---- >> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c >> index 1af89782e116..a1beaa2acc96 100644 >> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c >> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c >> @@ -1336,12 +1336,9 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster) >> * and ignore core1 dt node. >> */ >> core_count = of_get_available_child_count(dev_node); >> - if (core_count == 0) { >> + if (core_count == 0 || core_count > 2) { >> 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; > > When thinking about the specific usecase where, in split mode, a single core is > enabled - can it be either core0 or core1 or does it have to be core0? > Correct. It doesn't have to be core0. > Is the code in the driver ready to handle this configuration? > Yes, driver will handle all following cases correctly. Case 1: core0 enabled, core1 disabled Case 2: core0 disabled, core1 enabled Case 3: core0 enabled, core 1 enabled I will document all cases in the comment in the driver. > The inline comments you already have to explain the possible configurations > need to be update to address this new usecase. > > Thanks, > Mathieu > >> >> base-commit: dc8417021bcd01914a416bf8bab811a6c5e7d99a >> -- >> 2.34.1 >> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-13 18:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-10 19:27 [PATCH v2] remoteproc: xlnx: allow single core use in split mode Tanmay Shah 2025-06-11 6:53 ` Peng Fan 2025-06-13 17:18 ` Mathieu Poirier 2025-06-13 18:07 ` Tanmay Shah
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox