Re: [PATCH 5/7] remoteproc: Move Elf related functions to separate file

From: Ohad Ben-Cohen
Date: Sun Jun 10 2012 - 11:06:46 EST


On Wed, Jun 6, 2012 at 4:38 PM, <sjur.brandeland@xxxxxxxxxxxxxx> wrote:
> From: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>
>
> Prepare for introduction of custom firmware loaders by
> moving all ELF related handling into a separate file.
> The functions: rproc_find_rsc_table(), rproc_fw_sanity_check(),
> rproc_find_rsc_table() and rproc_set_boot_addr() are moved
> to the new file remoteproc_elf_loader.c. No functional
> changes are introduced in this patch.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>

Very nice!

> @@ -165,7 +165,7 @@ static void rproc_disable_iommu(struct rproc *rproc)
>  * but only on kernel direct mapped RAM memory. Instead, we're just using
>  * here the output of the DMA API, which should be more correct.
>  */
> -static void *rproc_da_to_va(struct rproc *rproc, u64 da, int len)
> +void *rproc_da_to_va(struct rproc *rproc, u64 da, int len)

Can be nice to shortly mention this change in the commit log too.

> diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
> +int
> +rproc_load_segments(struct rproc *rproc, const struct firmware *fw);
> +struct resource_table *
> +rproc_find_rsc_table(struct rproc *rproc, const struct firmware *fw,
> +                                                               int *tablesz);
> +int
> +rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw);
> +void rproc_set_boot_addr(struct rproc *rproc, const struct firmware *fw);
...
> +void *rproc_da_to_va(struct rproc *rproc, u64 da, int len);

remoteproc_internal.h might be a better place for these, I think,
because it's not exposed to the users.

Thanks,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/