All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Tanmay Shah <tanmay.shah@amd.com>
Cc: andersson@kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] remoteproc: xlnx: allow single core use in split mode
Date: Mon, 23 Jun 2025 09:33:33 -0600	[thread overview]
Message-ID: <aFlzzSvUsstEQsKP@p14s> (raw)
In-Reply-To: <20250618181933.1253033-1-tanmay.shah@amd.com>

On Wed, Jun 18, 2025 at 11:19:33AM -0700, Tanmay Shah wrote:
> When operating in split mode, it is a valid usecase to have
> only one core enabled in the cluster. Remove exact core count
> expecatation from the driver.
> 
> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
> ---
> 
> Changes in v3:
>   - Fix commit message
>   - Add details about split mode configuration in comment
> 
> Change in v2:
>   - limit core_count to max 2
> 
>  drivers/remoteproc/xlnx_r5_remoteproc.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)

Merged.

Thanks,
Mathieu

> 
> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
> index 1af89782e116..5aa3fd1b0530 100644
> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
> @@ -1329,19 +1329,23 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster)
>  
>  	/*
>  	 * Number of cores is decided by number of child nodes of
> -	 * r5f subsystem node in dts. If Split mode is used in dts
> -	 * 2 child nodes are expected.
> +	 * r5f subsystem node in dts.
> +	 * In split mode maximum two child nodes are expected.
> +	 * However, only single core can be enabled too.
> +	 * Driver can handle following configuration in split mode:
> +	 * 1) core0 enabled, core1 disabled
> +	 * 2) core0 disabled, core1 enabled
> +	 * 3) core0 and core1 both are enabled.
> +	 * For now, no more than two cores are expected per cluster
> +	 * in split mode.
>  	 * In lockstep mode if two child nodes are available,
>  	 * only use first child node and consider it as core0
>  	 * 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: d293da1e4dbebb40560e4c6a417b29ce3393659a
> -- 
> 2.34.1
> 

      reply	other threads:[~2025-06-23 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 18:19 [PATCH v3] remoteproc: xlnx: allow single core use in split mode Tanmay Shah
2025-06-23 15:33 ` Mathieu Poirier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aFlzzSvUsstEQsKP@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=andersson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=tanmay.shah@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.