soc.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers
@ 2021-11-24  8:50 Krzysztof Kozlowski
  2021-11-24  8:50 ` [PATCH 1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9 Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-11-24  8:50 UTC (permalink / raw)
  To: arm, soc, Arnd Bergmann, Olof Johansson; +Cc: Krzysztof Kozlowski

Hi Arnd and Olof,

I have two fixes for current cycle, in two different trees so I combined
them in patchset here:
1. Samsung ARM64 dts fix,
2. Memory controller drivers fix.

Both fix commits merged during this v5.16-rc1 merge window.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9
  2021-11-24  8:50 [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers Krzysztof Kozlowski
@ 2021-11-24  8:50 ` Krzysztof Kozlowski
  2021-11-24  8:50 ` [PATCH 2/2] memory: mtk-smi: Fix a null dereference for the ostd Krzysztof Kozlowski
  2021-11-25 15:30 ` [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers patchwork-bot+linux-soc
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-11-24  8:50 UTC (permalink / raw)
  To: arm, soc, Arnd Bergmann, Olof Johansson; +Cc: Chanho Park, Krzysztof Kozlowski

From: Chanho Park <chanho61.park@samsung.com>

samsung,ufs-shareability-reg-offset is not necessary anymore since it
was integrated into the second argument of samsung,sysreg.

Fixes: 31bbac5263aa ("arm64: dts: exynos: add initial support for exynosautov9 SoC")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20211102064826.15796-1-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index 3e4727344b4a..a960c0bc2dba 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -296,8 +296,7 @@ ufs_0: ufs0@17e00000 {
 			pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>;
 			phys = <&ufs_0_phy>;
 			phy-names = "ufs-phy";
-			samsung,sysreg = <&syscon_fsys2>;
-			samsung,ufs-shareability-reg-offset = <0x710>;
+			samsung,sysreg = <&syscon_fsys2 0x710>;
 			status = "disabled";
 		};
 	};
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] memory: mtk-smi: Fix a null dereference for the ostd
  2021-11-24  8:50 [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers Krzysztof Kozlowski
  2021-11-24  8:50 ` [PATCH 1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9 Krzysztof Kozlowski
@ 2021-11-24  8:50 ` Krzysztof Kozlowski
  2021-11-25 15:30 ` [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers patchwork-bot+linux-soc
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-11-24  8:50 UTC (permalink / raw)
  To: arm, soc, Arnd Bergmann, Olof Johansson; +Cc: Yong Wu, Krzysztof Kozlowski

From: Yong Wu <yong.wu@mediatek.com>

We add the ostd setting for mt8195. It introduces a KE for the
previous SoC which doesn't have ostd setting. This is the log:

Unable to handle kernel NULL pointer dereference at virtual address
0000000000000080
...
pc : mtk_smi_larb_config_port_gen2_general+0x64/0x130
lr : mtk_smi_larb_resume+0x54/0x98
...
Call trace:
 mtk_smi_larb_config_port_gen2_general+0x64/0x130
 pm_generic_runtime_resume+0x2c/0x48
 __genpd_runtime_resume+0x30/0xa8
 genpd_runtime_resume+0x94/0x2c8
 __rpm_callback+0x44/0x150
 rpm_callback+0x6c/0x78
 rpm_resume+0x310/0x558
 __pm_runtime_resume+0x3c/0x88

In the code: larbostd = larb->larb_gen->ostd[larb->larbid],
if "larb->larb_gen->ostd" is null, the "larbostd" is the offset(e.g.
0x80 above), it's also a valid value, then accessing "larbostd[i]" in the
"for" loop will cause the KE above. To avoid this issue, initialize
"larbostd" to NULL when the SoC doesn't have ostd setting.

Fixes: fe6dd2a4017d ("memory: mtk-smi: mt8195: Add initial setting for smi-larb")
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20211108082429.15080-1-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/memory/mtk-smi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index b883dcc0bbfa..e201e5976f34 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -241,7 +241,7 @@ static void mtk_smi_larb_config_port_gen2_general(struct device *dev)
 {
 	struct mtk_smi_larb *larb = dev_get_drvdata(dev);
 	u32 reg, flags_general = larb->larb_gen->flags_general;
-	const u8 *larbostd = larb->larb_gen->ostd[larb->larbid];
+	const u8 *larbostd = larb->larb_gen->ostd ? larb->larb_gen->ostd[larb->larbid] : NULL;
 	int i;
 
 	if (BIT(larb->larbid) & larb->larb_gen->larb_direct_to_common_mask)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers
  2021-11-24  8:50 [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers Krzysztof Kozlowski
  2021-11-24  8:50 ` [PATCH 1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9 Krzysztof Kozlowski
  2021-11-24  8:50 ` [PATCH 2/2] memory: mtk-smi: Fix a null dereference for the ostd Krzysztof Kozlowski
@ 2021-11-25 15:30 ` patchwork-bot+linux-soc
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-soc @ 2021-11-25 15:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: soc

Hello:

This series was applied to soc/soc.git (arm/fixes)
by Arnd Bergmann <arnd@arndb.de>:

On Wed, 24 Nov 2021 09:50:40 +0100 you wrote:
> Hi Arnd and Olof,
> 
> I have two fixes for current cycle, in two different trees so I combined
> them in patchset here:
> 1. Samsung ARM64 dts fix,
> 2. Memory controller drivers fix.
> 
> [...]

Here is the summary with links:
  - [1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9
    https://git.kernel.org/soc/soc/c/5fe762515bc9
  - [2/2] memory: mtk-smi: Fix a null dereference for the ostd
    https://git.kernel.org/soc/soc/c/383a44aec91c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-25 15:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  8:50 [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers Krzysztof Kozlowski
2021-11-24  8:50 ` [PATCH 1/2] arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9 Krzysztof Kozlowski
2021-11-24  8:50 ` [PATCH 2/2] memory: mtk-smi: Fix a null dereference for the ostd Krzysztof Kozlowski
2021-11-25 15:30 ` [PATCH 0/2] fixes for current v5.16: arm64/dts and drivers patchwork-bot+linux-soc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).