remoteproc: Rename rproc_elf_sanity_check for elf32
authorClement Leger <cleger@kalray.eu>
Mon, 2 Mar 2020 09:38:59 +0000 (10:38 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 26 Mar 2020 05:29:40 +0000 (22:29 -0700)
Since this function will be modified to support both elf32 and elf64,
rename the existing one to elf32 (which is the only supported format
at the moment). This will allow not to introduce possible side effect
when adding elf64 support (ie: all backends will still support only
elf32 if not requested explicitely using rproc_elf_sanity_check).

Signed-off-by: Clement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200302093902.27849-6-cleger@kalray.eu
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c
drivers/remoteproc/remoteproc_elf_loader.c
drivers/remoteproc/remoteproc_internal.h
drivers/remoteproc/st_remoteproc.c
drivers/remoteproc/st_slim_rproc.c
drivers/remoteproc/stm32_rproc.c

index ebb7213c33b1c219724d83d3c2b3a76b4ef725a2..0f4a426447ae53af7ba2755699f9d4214cd34305 100644 (file)
@@ -2061,7 +2061,7 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
                rproc->ops->load = rproc_elf_load_segments;
                rproc->ops->parse_fw = rproc_elf_load_rsc_table;
                rproc->ops->find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table;
-               rproc->ops->sanity_check = rproc_elf_sanity_check;
+               rproc->ops->sanity_check = rproc_elf32_sanity_check;
                rproc->ops->get_boot_addr = rproc_elf_get_boot_addr;
        }
 
index c2a9783cfb9a2651627c7dd176107759639d3be9..5a67745f2638bffca77e3f8514e7d586d266c16a 100644 (file)
 #include "remoteproc_internal.h"
 
 /**
- * rproc_elf_sanity_check() - Sanity Check ELF firmware image
+ * rproc_elf_sanity_check() - Sanity Check ELF32 firmware image
  * @rproc: the remote processor handle
  * @fw: the ELF firmware image
  *
  * Make sure this fw image is sane.
  */
-int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
+int rproc_elf32_sanity_check(struct rproc *rproc, const struct firmware *fw)
 {
        const char *name = rproc->firmware;
        struct device *dev = &rproc->dev;
@@ -89,7 +89,7 @@ int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
 
        return 0;
 }
-EXPORT_SYMBOL(rproc_elf_sanity_check);
+EXPORT_SYMBOL(rproc_elf32_sanity_check);
 
 /**
  * rproc_elf_get_boot_addr() - Get rproc's boot address.
index 23f7a713995f48e29d439d047fe8a96343236881..85903f5fea5b35852a3ede5b7dc0a80080db9194 100644 (file)
@@ -54,7 +54,7 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len);
 phys_addr_t rproc_va_to_pa(void *cpu_addr);
 int rproc_trigger_recovery(struct rproc *rproc);
 
-int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw);
+int rproc_elf32_sanity_check(struct rproc *rproc, const struct firmware *fw);
 u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw);
 int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw);
 int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw);
index a3268d95a50e68248ef34ab89aa59f76d7f47965..a6cbfa45276463348d6c6937b6be03cb0fb7106b 100644 (file)
@@ -233,7 +233,7 @@ static const struct rproc_ops st_rproc_ops = {
        .parse_fw               = st_rproc_parse_fw,
        .load                   = rproc_elf_load_segments,
        .find_loaded_rsc_table  = rproc_elf_find_loaded_rsc_table,
-       .sanity_check           = rproc_elf_sanity_check,
+       .sanity_check           = rproc_elf32_sanity_check,
        .get_boot_addr          = rproc_elf_get_boot_addr,
 };
 
index 09bcb4d8b9e03b4cfcf3a96f87d892cc8cf8b005..3cca8b65a8dba3046561c52461b48c21dfaba189 100644 (file)
@@ -203,7 +203,7 @@ static const struct rproc_ops slim_rproc_ops = {
        .da_to_va       = slim_rproc_da_to_va,
        .get_boot_addr  = rproc_elf_get_boot_addr,
        .load           = rproc_elf_load_segments,
-       .sanity_check   = rproc_elf_sanity_check,
+       .sanity_check   = rproc_elf32_sanity_check,
 };
 
 /**
index a18f8804411199daa78b933afa807a91ea58d16a..9a8b5f5e2572d51bf62a0ff18a1ded4585ea4a29 100644 (file)
@@ -505,7 +505,7 @@ static struct rproc_ops st_rproc_ops = {
        .load           = rproc_elf_load_segments,
        .parse_fw       = stm32_rproc_parse_fw,
        .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table,
-       .sanity_check   = rproc_elf_sanity_check,
+       .sanity_check   = rproc_elf32_sanity_check,
        .get_boot_addr  = rproc_elf_get_boot_addr,
 };