forked from Minki/linux
remoteproc fixes for v5.12
This fixes an issue with firmware loading on the TI K3 PRU, fixes compatibility with GNU binutils for the same and resolves link error due to a 64-bit division in the Qualcomm PIL info. It also recognizes Mathieu Poirier as co-maintainer of the remoteproc and rpmsg subsystems. -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmBwenUbHGJqb3JuLmFu ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FPiAP/2RGXzCLci4k3H+4mAkX EpZxOZRKWD+X2fjVkUr89Q70cv9xX0Bab7yy8g9aQv7qQjLvXJlXhAoQx8TA5kge Nv3vv+yY0H7Ddpw/tLvOhNdeEw3ViOlvESvEpxipt2L464FrHc14ryFQ99tmh5h8 R7SGpJAKXv3pNlxegmqlX1q76ctHFG1nJWsmZr2cjo2rnAModae/0LOAduY21sfr RDi9MqkCW7nLrW1TYPZIJBMBnMSYe/i6hm4L4toBLEcR+tjg0UPKtWE8qaHhhcSz icySRb0odVrdL88JYo7TrKE2cUPaldF3AwU9TdwUkmKCl4ejHjOG0fcngN1/86rn a3kWq/pMfIXAkCl0l9jh3WNcZole8xz7PSUOhIHX2k5UI+/lFqcgmOhodFgF8gPa b7tACVVmTTdx6pT8py38fg4oEoyDywHNNM9zD+19iIkzq3jPyNVe6CdTu+ukIkez al2PagFI7Cf6DYzS/L0j0fHJXOKB3gRKGALtUcdW92WW+vatVCwlTgIlnLTiDaws Wxl6DBGFJbSbPKEnJ6yyT/B+c3igO+5T/5U9rx3xQ2Xgaso4VEve0gHluepCm/7a LGsw8XEcRyIs0S/PLJLvngi/vZtihRxtS5HDULNqY27YcUu9YHHZ8oO98V63P3gO Pu5SHIFNbFIqV63Pw73h/nSE =DdER -----END PGP SIGNATURE----- Merge tag 'rproc-v5.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc fixes from Bjorn Andersson: "This fixes an issue with firmware loading on the TI K3 PRU, fixes compatibility with GNU binutils for the same and resolves link error due to a 64-bit division in the Qualcomm PIL info. It also recognizes Mathieu Poirier as co-maintainer of the remoteproc and rpmsg subsystems" * tag 'rproc-v5.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: remoteproc: pru: Fix firmware loading crashes on K3 SoCs remoteproc: pru: Fix loading of GNU Binutils ELF MAINTAINERS: Add co-maintainer for remoteproc/RPMSG subsystems remoteproc: qcom: pil_info: avoid 64-bit division
This commit is contained in:
commit
3766fcf5d3
|
@ -15199,6 +15199,7 @@ F: fs/reiserfs/
|
|||
REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM
|
||||
M: Ohad Ben-Cohen <ohad@wizery.com>
|
||||
M: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
M: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
L: linux-remoteproc@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rproc-next
|
||||
|
@ -15212,6 +15213,7 @@ F: include/linux/remoteproc/
|
|||
REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
|
||||
M: Ohad Ben-Cohen <ohad@wizery.com>
|
||||
M: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
M: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
L: linux-remoteproc@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git rpmsg-next
|
||||
|
|
|
@ -450,6 +450,24 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len)
|
|||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* GNU binutils do not support multiple address spaces. The GNU
|
||||
* linker's default linker script places IRAM at an arbitrary high
|
||||
* offset, in order to differentiate it from DRAM. Hence we need to
|
||||
* strip the artificial offset in the IRAM addresses coming from the
|
||||
* ELF file.
|
||||
*
|
||||
* The TI proprietary linker would never set those higher IRAM address
|
||||
* bits anyway. PRU architecture limits the program counter to 16-bit
|
||||
* word-address range. This in turn corresponds to 18-bit IRAM
|
||||
* byte-address range for ELF.
|
||||
*
|
||||
* Two more bits are added just in case to make the final 20-bit mask.
|
||||
* Idea is to have a safeguard in case TI decides to add banking
|
||||
* in future SoCs.
|
||||
*/
|
||||
da &= 0xfffff;
|
||||
|
||||
if (da >= PRU_IRAM_DA &&
|
||||
da + len <= PRU_IRAM_DA + pru->mem_regions[PRU_IOMEM_IRAM].size) {
|
||||
offset = da - PRU_IRAM_DA;
|
||||
|
@ -585,7 +603,7 @@ pru_rproc_load_elf_segments(struct rproc *rproc, const struct firmware *fw)
|
|||
break;
|
||||
}
|
||||
|
||||
if (pru->data->is_k3 && is_iram) {
|
||||
if (pru->data->is_k3) {
|
||||
ret = pru_rproc_memcpy(ptr, elf_data + phdr->p_offset,
|
||||
filesz);
|
||||
if (ret) {
|
||||
|
|
|
@ -56,7 +56,7 @@ static int qcom_pil_info_init(void)
|
|||
memset_io(base, 0, resource_size(&imem));
|
||||
|
||||
_reloc.base = base;
|
||||
_reloc.num_entries = resource_size(&imem) / PIL_RELOC_ENTRY_SIZE;
|
||||
_reloc.num_entries = (u32)resource_size(&imem) / PIL_RELOC_ENTRY_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user