All of lore.kernel.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 18/18] remoteproc: core: Retry rproc_fw_config_virtio() if !rproc->table_ptr
Date: Fri, 5 Aug 2016 13:52:05 +0100	[thread overview]
Message-ID: <20160805125205.GY5243@dell> (raw)
In-Reply-To: <1467795276-21725-19-git-send-email-peter.griffin@linaro.org>

On Wed, 06 Jul 2016, Peter Griffin wrote:

> When rproc drivers are built-in the async firmware load done by rproc_add()
> can fail due to the firmware not being present. Subsqeuent calls to
> rproc_fw_boot() then fail, even though by this point firmware has been
> successfully obtained.
> 
> This patch changes the behaviour to re-execute rproc_fw_config_virtio()
> in rproc_fw_boot() if it has previously failed, and we are sure it is
> now available.
> 
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
>  drivers/remoteproc/remoteproc_core.c     | 25 +++++++++++++++++++------
>  drivers/remoteproc/remoteproc_internal.h |  3 +++
>  2 files changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index db3958b..749f261 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -801,8 +801,12 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
>  	struct resource_table *table, *loaded_table;
>  	int ret, tablesz;
>  
> +	/*
> +	 * This can happen when built-in if initial async fw load fails.
> +	 * However we now have firmware available so retry.
> +	 */
>  	if (!rproc->table_ptr)
> -		return -ENOMEM;
> +		rproc_fw_config_virtio(fw, rproc);

It's probably better to "hold that thought" on this patch, since we're
going to make resource tables optional.  I'm keen to tackle this
issue, but need to work a few other things before doing so.

Current task list:
 - Amend/supply new resource table from platform-specific drivers
 - Make resource tables optional
 - Obtain firmwares from the root file system
 - Lots more here including; co-proc DT support, co-proc console, etc

[...]

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Peter Griffin <peter.griffin@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel@stlinux.com,
	vinod.koul@intel.com, patrice.chotard@st.com,
	bjorn.andersson@linaro.org, ohad@wizery.com,
	dmaengine@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 18/18] remoteproc: core: Retry rproc_fw_config_virtio() if !rproc->table_ptr
Date: Fri, 5 Aug 2016 13:52:05 +0100	[thread overview]
Message-ID: <20160805125205.GY5243@dell> (raw)
In-Reply-To: <1467795276-21725-19-git-send-email-peter.griffin@linaro.org>

On Wed, 06 Jul 2016, Peter Griffin wrote:

> When rproc drivers are built-in the async firmware load done by rproc_add()
> can fail due to the firmware not being present. Subsqeuent calls to
> rproc_fw_boot() then fail, even though by this point firmware has been
> successfully obtained.
> 
> This patch changes the behaviour to re-execute rproc_fw_config_virtio()
> in rproc_fw_boot() if it has previously failed, and we are sure it is
> now available.
> 
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
>  drivers/remoteproc/remoteproc_core.c     | 25 +++++++++++++++++++------
>  drivers/remoteproc/remoteproc_internal.h |  3 +++
>  2 files changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index db3958b..749f261 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -801,8 +801,12 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
>  	struct resource_table *table, *loaded_table;
>  	int ret, tablesz;
>  
> +	/*
> +	 * This can happen when built-in if initial async fw load fails.
> +	 * However we now have firmware available so retry.
> +	 */
>  	if (!rproc->table_ptr)
> -		return -ENOMEM;
> +		rproc_fw_config_virtio(fw, rproc);

It's probably better to "hold that thought" on this patch, since we're
going to make resource tables optional.  I'm keen to tackle this
issue, but need to work a few other things before doing so.

Current task list:
 - Amend/supply new resource table from platform-specific drivers
 - Make resource tables optional
 - Obtain firmwares from the root file system
 - Lots more here including; co-proc DT support, co-proc console, etc

[...]

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2016-08-05 12:52 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  8:54 [PATCH v6 00/18] Add support for FDMA DMA controller and slim core rproc found on STi chipsets Peter Griffin
2016-07-06  8:54 ` Peter Griffin
2016-07-06  8:54 ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06 10:22   ` kbuild test robot
2016-07-06 10:22     ` kbuild test robot
2016-07-06 10:22     ` kbuild test robot
2016-07-07  4:43   ` kbuild test robot
2016-07-07  4:43     ` kbuild test robot
2016-07-07  4:43     ` kbuild test robot
2016-07-06  8:54 ` [PATCH v6 02/18] MAINTAINERS: Add st slim core rproc driver to STi section Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 03/18] dmaengine: st_fdma: Add STMicroelectronics FDMA DT binding documentation Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 04/18] dmaengine: st_fdma: Add STMicroelectronics FDMA driver header file Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06 16:31   ` kbuild test robot
2016-07-06 16:31     ` kbuild test robot
2016-07-06 16:31     ` kbuild test robot
2016-07-06  8:54 ` [PATCH v6 06/18] ARM: STi: DT: STiH407: Add FDMA driver dt nodes Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 07/18] MAINTAINERS: Add FDMA driver files to STi section Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 08/18] ARM: multi_v7_defconfig: Enable STi FDMA driver Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 09/18] ARM: multi_v7_defconfig: Enable STi and simple-card drivers Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 10/18] ARM: DT: STiH407: Add i2s_out pinctrl configuration Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 11/18] ARM: DT: STiH407: Add i2s_in " Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 12/18] ARM: DT: STiH407: Add spdif_out pinctrl config Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 13/18] ARM: STi: DT: STiH407: Add sti-sasg-codec dt node Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 15/18] ARM: STi: DT: STiH407: Add uniperif reader " Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 16/18] ARM: DT: STi: stihxxx-b2120: Add DT nodes for STi audio card Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 17/18] dmaengine: st_fdma: Change to late_initcall_sync Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-06  8:54 ` [PATCH v6 18/18] remoteproc: core: Retry rproc_fw_config_virtio() if !rproc->table_ptr Peter Griffin
2016-07-06  8:54   ` Peter Griffin
2016-07-07  1:25   ` kbuild test robot
2016-07-07  1:25     ` kbuild test robot
2016-07-07  1:25     ` kbuild test robot
2016-07-07 10:20     ` Peter Griffin
2016-07-07 10:20       ` Peter Griffin
2016-07-07 10:20       ` Peter Griffin
2016-08-05 12:52   ` Lee Jones [this message]
2016-08-05 12:52     ` Lee Jones
2016-07-06 16:40 ` [PATCH v6 00/18] Add support for FDMA DMA controller and slim core rproc found on STi chipsets Joe Perches
2016-07-06 16:40   ` Joe Perches
2016-07-06 19:49   ` Peter Griffin
2016-07-06 19:49     ` Peter Griffin

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=20160805125205.GY5243@dell \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.