Patch "remoteproc: qcom: pil_info: avoid 64-bit division" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    remoteproc: qcom: pil_info: avoid 64-bit division

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     remoteproc-qcom-pil_info-avoid-64-bit-division.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6f718d2c95d9719f88469e1215256dec7c953582
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Sun Jan 3 14:56:12 2021 +0100

    remoteproc: qcom: pil_info: avoid 64-bit division
    
    [ Upstream commit 7029e783027706b427bbfbdf8558252c1dac6fa0 ]
    
    On 32-bit machines with 64-bit resource_size_t, the driver causes
    a link failure because of the 64-bit division:
    
    arm-linux-gnueabi-ld: drivers/remoteproc/qcom_pil_info.o: in function `qcom_pil_info_store':
    qcom_pil_info.c:(.text+0x1ec): undefined reference to `__aeabi_uldivmod'
    
    Add a cast to an u32 to avoid this. If the resource exceeds 4GB,
    there are bigger problems.
    
    Fixes: 549b67da660d ("remoteproc: qcom: Introduce helper to store pil info in IMEM")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Link: https://lore.kernel.org/r/20210103135628.3702427-1-arnd@xxxxxxxxxx
    Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/remoteproc/qcom_pil_info.c b/drivers/remoteproc/qcom_pil_info.c
index 5521c4437ffa..7c007dd7b200 100644
--- a/drivers/remoteproc/qcom_pil_info.c
+++ b/drivers/remoteproc/qcom_pil_info.c
@@ -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;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux