History

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.

Clement Leger committed 6 years ago

Commit e4ae4b71 parent 096ee784 files · +6 −6Browse files

Unified · Split

4 files
  1. drivers/remoteproc/remoteproc_elf_loader.c +1 −1
  2. drivers/remoteproc/remoteproc_internal.h +2 −2
  3. drivers/remoteproc/st_remoteproc.c +1 −1
  4. include/linux/remoteproc.h +2 −2
drivers/remoteproc/remoteproc_elf_loader.c+1−1
@@ -102,7 +102,7 @@ EXPORT_SYMBOL(rproc_elf_sanity_check); · 101 unmodified lines
102102 * Note that the boot address is not a configurable property of all remote
103103 * processors. Some will always boot at a specific hard-coded address.
104104 */
105−u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
105+u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
106106 {
107107 struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data;
108108
drivers/remoteproc/remoteproc_internal.h+2−2
@@ -55,7 +55,7 @@ phys_addr_t rproc_va_to_pa(void *cpu_addr); · 54 unmodified lines
5555 int rproc_trigger_recovery(struct rproc *rproc);
5656
5757 int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw);
58−u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw);
58+u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw);
5959 int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw);
6060 int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw);
6161 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) · 11 unmodified lines
7373 }
7474
7575 static inline
76−u32 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
76+u64 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw)
7777 {
7878 if (rproc->ops->get_boot_addr)
7979 return rproc->ops->get_boot_addr(rproc, fw);
drivers/remoteproc/st_remoteproc.c+1−1
@@ -190,7 +190,7 @@ static int st_rproc_start(struct rproc *rproc) · 189 unmodified lines
190190 }
191191 }
192192
193− dev_info(&rproc->dev, "Started from 0x%x\n", rproc->bootaddr);
193+ dev_info(&rproc->dev, "Started from 0x%llx\n", rproc->bootaddr);
194194
195195 return 0;
196196
include/linux/remoteproc.h+2−2
@@ -382,7 +382,7 @@ struct rproc_ops { · 381 unmodified lines
382382 struct rproc *rproc, const struct firmware *fw);
383383 int (*load)(struct rproc *rproc, const struct firmware *fw);
384384 int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
385− u32 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
385+ u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
386386 };
387387
388388 /**
@@ -498,7 +498,7 @@ struct rproc { · 109 unmodified lines
498498 int num_traces;
499499 struct list_head carveouts;
500500 struct list_head mappings;
501− u32 bootaddr;
501+ u64 bootaddr;
502502 struct list_head rvdevs;
503503 struct list_head subdevs;
504504 struct idr notifyids;