[imx8mp] 256MB of memory wasted in default dtsi

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

[imx8mp] 256MB of memory wasted in default dtsi

跳至解决方案
710 次查看
martinetd
Contributor IV

Hello,

 

The imx8mp.dtsi device tree include shipped in https://github.com/nxp-imx/linux-imx (all branches) defined a `isp0_reserved` memory region which is unmapped by linux even if isp0 itself is disabled.

Disabling the memory region immediately frees up 256MB of memory (just disabling the node is enough, see below patch)

The comment immediately above states "used only by tuning tool, can be removed for normal case" so there probably is no reason to keep it enabled by default, please report this to whomever if may concern (the linux upstream dtsi does not contain this section)

 

 

 

From c26321365174d71cf8642f309f16eeefda36c7c9 Mon Sep 17 00:00:00 2001
From: Dominique Martinet <dominique.martinet@atmark-techno.com>
Date: Fri, 28 Apr 2023 12:48:47 +0900
Subject: [PATCH] arm64: imx8mp.dtsi: disable isp0_reserved by default

isp0_reserved is 256MB big and described as "used only by tuning tool,
can be removed for normal case": so disable it by default,
and anyone enabling isp0 must enable the reserved memory as well
manually
(why wouldn't linux automatically do this...)

This increases the available memory on Armadillo IoT G4 as confirmed
below.

Before:
armadillo:~# free -m
       total        used        free      shared  buff/cache   available
Mem:    1668         884         209          67         575         629

After:
armadillo:~# free -m
       total        used        free      shared  buff/cache   available
Mem:    1924         341        1531           1          52        1524

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index dccf24c90862..dde207a7f348 100755
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -217,6 +217,7 @@ dsp_vdev0buffer: vdev0buffer@94300000 {
 		isp0_reserved: isp0@94400000 {
 			no-map;
 			reg = <0 0x94400000 0 0x10000000>;
+			status = "disabled";
 		};
 	};
 
-- 
2.39.2

 

 

 

Thanks.

0 项奖励
回复
1 解答
588 次查看
martinetd
Contributor IV

I see it's been removed in the latest BSP (lf-6.1.22-2.0.0, in commit https://github.com/nxp-imx/linux-imx/commit/910178d16dd3e4cba08bebde148c493308cd3fd7 )

Thanks

在原帖中查看解决方案

0 项奖励
回复
2 回复数
681 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.
 
It is true that the reserved memory node will reserve memory irrespective of the status of the isp node.
 
One can disable it for normal use cases.
 
I will inform the internal team regarding this case.
 
Thanks & Regards,
Sanket Parekh
589 次查看
martinetd
Contributor IV

I see it's been removed in the latest BSP (lf-6.1.22-2.0.0, in commit https://github.com/nxp-imx/linux-imx/commit/910178d16dd3e4cba08bebde148c493308cd3fd7 )

Thanks

0 项奖励
回复