[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130224162124.GB19603@WorkStation.localnet>
Date: Sun, 24 Feb 2013 18:21:24 +0200
From: Ido Yariv <ido@...ery.com>
To: sjur.brandeland@...ricsson.com
Cc: Ohad Ben-Cohen <ohad@...ery.com>, linux-kernel@...r.kernel.org,
Dmitry Tarnyagin <dmitry.tarnyagin@...ricsson.com>,
Linus Walleij <linus.walleij@...aro.org>,
Erwan Yvin <erwan.yvin@...ricsson.com>, sjur@...ndeland.net
Subject: Re: [PATCHv2 04/10] remoteproc: Parse ELF file to find resource
table address
Hi Sjur,
On Thu, Feb 21, 2013 at 06:15:34PM +0100, sjur.brandeland@...ricsson.com wrote:
> From: Sjur Brændeland <sjur.brandeland@...ricsson.com>
>
> Add function find_rsc_table_va to firmware ops. This function
> returns the location of the resource table in shared memory
> after loading.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricsson.com>
> ---
> drivers/remoteproc/remoteproc_elf_loader.c | 17 ++++++++++++++++-
> drivers/remoteproc/remoteproc_internal.h | 13 +++++++++++++
> 2 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c
> index ed12c16..3d6ec76 100644
> --- a/drivers/remoteproc/remoteproc_elf_loader.c
> +++ b/drivers/remoteproc/remoteproc_elf_loader.c
> @@ -304,9 +304,24 @@ rproc_elf_find_rsc_table(struct rproc *rproc, const struct firmware *fw,
> return table;
> }
>
> +static struct resource_table *rproc_elf_get_rsctab_va(struct rproc *rproc,
> + const struct firmware *fw)
> +{
> + struct elf32_shdr *shdr;
> +
> + shdr = find_rsc_shdr(&rproc->dev, (struct elf32_hdr *)fw->data,
> + fw->size);
> + if (!shdr)
> + return NULL;
> +
> + /* Find resource table in loaded segments */
> + return rproc_da_to_va(rproc, shdr->sh_addr, shdr->sh_size);
> +}
> +
> const struct rproc_fw_ops rproc_elf_fw_ops = {
> .load = rproc_elf_load_segments,
> .find_rsc_table = rproc_elf_find_rsc_table,
> .sanity_check = rproc_elf_sanity_check,
> - .get_boot_addr = rproc_elf_get_boot_addr
> + .get_boot_addr = rproc_elf_get_boot_addr,
> + .get_rsctab_va = rproc_elf_get_rsctab_addr
There's a typo here, fixed in the next patch instead of this one, which
will break bisect.
Other than that this patch set looks good. This issue can be fixed when
the patches are merged, so I don't think there's a need to resend
another revision.
Thanks,
Ido.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists