Commit e4ae4b7d authored by Clement Leger's avatar Clement Leger Committed by Bjorn Andersson

remoteproc: Use u64 type for boot_addr

elf64 entry is defined as a u64. Since boot_addr is used to store the
elf entry point, change boot_addr type to u64 to support both elf32
and elf64. In the same time, fix users that were using this variable.
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarClement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200302093902.27849-4-cleger@kalray.eu
[bjorn: Fixes up return type of rproc_get_boot_addr()]
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 096ee786
...@@ -102,7 +102,7 @@ EXPORT_SYMBOL(rproc_elf_sanity_check); ...@@ -102,7 +102,7 @@ EXPORT_SYMBOL(rproc_elf_sanity_check);
* Note that the boot address is not a configurable property of all remote * Note that the boot address is not a configurable property of all remote
* processors. Some will always boot at a specific hard-coded address. * processors. Some will always boot at a specific hard-coded address.
*/ */
u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw) u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
{ {
struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data;
......
...@@ -55,7 +55,7 @@ phys_addr_t rproc_va_to_pa(void *cpu_addr); ...@@ -55,7 +55,7 @@ phys_addr_t rproc_va_to_pa(void *cpu_addr);
int rproc_trigger_recovery(struct rproc *rproc); int rproc_trigger_recovery(struct rproc *rproc);
int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw); int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw);
u32 rproc_elf_get_boot_addr(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_segments(struct rproc *rproc, const struct firmware *fw);
int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw); int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw);
struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc,
...@@ -73,7 +73,7 @@ int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw) ...@@ -73,7 +73,7 @@ int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw)
} }
static inline static inline
u32 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw) u64 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
{ {
if (rproc->ops->get_boot_addr) if (rproc->ops->get_boot_addr)
return rproc->ops->get_boot_addr(rproc, fw); return rproc->ops->get_boot_addr(rproc, fw);
......
...@@ -190,7 +190,7 @@ static int st_rproc_start(struct rproc *rproc) ...@@ -190,7 +190,7 @@ static int st_rproc_start(struct rproc *rproc)
} }
} }
dev_info(&rproc->dev, "Started from 0x%x\n", rproc->bootaddr); dev_info(&rproc->dev, "Started from 0x%llx\n", rproc->bootaddr);
return 0; return 0;
......
...@@ -382,7 +382,7 @@ struct rproc_ops { ...@@ -382,7 +382,7 @@ struct rproc_ops {
struct rproc *rproc, const struct firmware *fw); struct rproc *rproc, const struct firmware *fw);
int (*load)(struct rproc *rproc, const struct firmware *fw); int (*load)(struct rproc *rproc, const struct firmware *fw);
int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
u32 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
}; };
/** /**
...@@ -498,7 +498,7 @@ struct rproc { ...@@ -498,7 +498,7 @@ struct rproc {
int num_traces; int num_traces;
struct list_head carveouts; struct list_head carveouts;
struct list_head mappings; struct list_head mappings;
u32 bootaddr; u64 bootaddr;
struct list_head rvdevs; struct list_head rvdevs;
struct list_head subdevs; struct list_head subdevs;
struct idr notifyids; struct idr notifyids;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment