mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From 90ec257c380ebdcebf332b698f3e809cd1157202 Mon Sep 17 00:00:00 2001
|
|
From: Bjorn Andersson <bjorn.andersson@linaro.org>
|
|
Date: Wed, 15 Jul 2020 22:48:17 -0700
|
|
Subject: [PATCH] remoteproc: qcom: pil-info: Fix shift overflow
|
|
|
|
On platforms with 32-bit phys_addr_t the shift to get the upper word of
|
|
the base address of the memory region is invalid. Cast the base to 64
|
|
bit to resolv this.
|
|
|
|
Fixes: 549b67da660d ("remoteproc: qcom: Introduce helper to store pil info in IMEM")
|
|
Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build
|
|
Reported-by: Lee Jones <lee.jones@linaro.org>
|
|
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
|
|
Link: https://lore.kernel.org/r/20200716054817.157608-1-bjorn.andersson@linaro.org
|
|
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
|
---
|
|
drivers/remoteproc/qcom_pil_info.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/remoteproc/qcom_pil_info.c
|
|
+++ b/drivers/remoteproc/qcom_pil_info.c
|
|
@@ -108,7 +108,7 @@ found_unused:
|
|
found_existing:
|
|
/* Use two writel() as base is only aligned to 4 bytes on odd entries */
|
|
writel(base, entry + PIL_RELOC_NAME_LEN);
|
|
- writel(base >> 32, entry + PIL_RELOC_NAME_LEN + 4);
|
|
+ writel((u64)base >> 32, entry + PIL_RELOC_NAME_LEN + 4);
|
|
writel(size, entry + PIL_RELOC_NAME_LEN + sizeof(__le64));
|
|
mutex_unlock(&pil_reloc_lock);
|
|
|