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.
Unified · Split
| @@ -102,7 +102,7 @@ EXPORT_SYMBOL(rproc_elf_sanity_check); · 101 unmodified lines | |||
| 102 | * Note that the boot address is not a configurable property of all remote | 102 | * Note that the boot address is not a configurable property of all remote |
| 103 | * processors. Some will always boot at a specific hard-coded address. | 103 | * processors. Some will always boot at a specific hard-coded address. |
| 104 | */ | 104 | */ |
| 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) |
| 106 | { | 106 | { |
| 107 | struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; | 107 | struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; |
| 108 | 108 | ||
| @@ -55,7 +55,7 @@ phys_addr_t rproc_va_to_pa(void *cpu_addr); · 54 unmodified lines | |||
| 55 | int rproc_trigger_recovery(struct rproc *rproc); | 55 | int rproc_trigger_recovery(struct rproc *rproc); |
| 56 | 56 | ||
| 57 | int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw); | 57 | 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); |
| 59 | int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw); | 59 | int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw); |
| 60 | int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw); | 60 | int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw); |
| 61 | struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, | 61 | 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 | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | static inline | 75 | 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) |
| 77 | { | 77 | { |
| 78 | if (rproc->ops->get_boot_addr) | 78 | if (rproc->ops->get_boot_addr) |
| 79 | return rproc->ops->get_boot_addr(rproc, fw); | 79 | return rproc->ops->get_boot_addr(rproc, fw); |
| @@ -190,7 +190,7 @@ static int st_rproc_start(struct rproc *rproc) · 189 unmodified lines | |||
| 190 | } | 190 | } |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | dev_info(&rproc->dev, "Started from 0x%x\n", rproc->bootaddr); | 193 | dev_info(&rproc->dev, "Started from 0x%llx\n", rproc->bootaddr); |
| 194 | 194 | ||
| 195 | return 0; | 195 | return 0; |
| 196 | 196 | ||
| @@ -382,7 +382,7 @@ struct rproc_ops { · 381 unmodified lines | |||
| 382 | struct rproc *rproc, const struct firmware *fw); | 382 | struct rproc *rproc, const struct firmware *fw); |
| 383 | int (*load)(struct rproc *rproc, const struct firmware *fw); | 383 | int (*load)(struct rproc *rproc, const struct firmware *fw); |
| 384 | int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); | 384 | 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); |
| 386 | }; | 386 | }; |
| 387 | 387 | ||
| 388 | /** | 388 | /** |
| @@ -498,7 +498,7 @@ struct rproc { · 109 unmodified lines | |||
| 498 | int num_traces; | 498 | int num_traces; |
| 499 | struct list_head carveouts; | 499 | struct list_head carveouts; |
| 500 | struct list_head mappings; | 500 | struct list_head mappings; |
| 501 | u32 bootaddr; | 501 | u64 bootaddr; |
| 502 | struct list_head rvdevs; | 502 | struct list_head rvdevs; |
| 503 | struct list_head subdevs; | 503 | struct list_head subdevs; |
| 504 | struct idr notifyids; | 504 | struct idr notifyids; |