Skip to contentSkip to conversation

arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region

PATCH In review Jamie Douglass 3 participants 6 messages Jan 28, 2023 – Jan 30, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region

A previously committed reserved memory region was overlapping with the SMEM memory region, causing an error message in dmesg:

	OF: reserved mem: OVERLAP DETECTED!
	reserved@5000000 (0x0000000005000000--0x0000000007200000)
	overlaps with smem_region@6a00000
	(0x0000000006a00000--0x0000000006c00000)

This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +7 -2
index 79de9cc395c4..5e375ea73c79 100644
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
 			no-map;
 		};
 
-		removed_region: reserved@5000000 {
-			reg = <0 0x05000000 0 0x2200000>;
+		reserved@5000000 {
+			reg = <0x0 0x05000000 0x0 0x1a00000>;
+			no-map;
+		};
+
+		reserved@6c00000 {
+			reg = <0x0 0x06c00000 0x0 0x400000>;
 			no-map;
 		};
 	};
Signature · 1 line
2.25.1
#1 lore raw
Quoted 21 lines · Jamie Douglass

A previously committed reserved memory region was overlapping with the SMEM memory region, causing an error message in dmesg:

	OF: reserved mem: OVERLAP DETECTED!
	reserved@5000000 (0x0000000005000000--0x0000000007200000)
	overlaps with smem_region@6a00000
	(0x0000000006a00000--0x0000000006c00000)

This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +0 -0
index 79de9cc395c4..5e375ea73c79 100644
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
 			no-map;
 		};

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 62

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +7 -2
 
-		removed_region: reserved@5000000 {
-			reg = <0 0x05000000 0 0x2200000>;
+		reserved@5000000 {
+			reg = <0x0 0x05000000 0x0 0x1a00000>;
+			no-map;
+		};
+
+		reserved@6c00000 {
+			reg = <0x0 0x06c00000 0x0 0x400000>;

I think you made this 0x200000 too small, unless there is supposed to be functional change.

Konrad

Quoted 3 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +0 -0
 			no-map;
 		};
 	};
#2 lore raw

My apologies, I completely forgot that I did that!

That change was necessary, because extending the reserved region past 0x7000000 creates another memory overlap, this time with the mpss_mem region:

               OF: reserved mem: OVERLAP DETECTED!
               reserved@6c00000 (0x0000000006c00000--0x0000000007200000)
               overlaps with memory@7000000
               (0x0000000007000000--0x000000000ca00000)

So my original patch is correct.

Thanks,
Jamie

Quoted 42 lines · Konrad Dybcio
Quoted 21 lines · Jamie Douglass

A previously committed reserved memory region was overlapping with the SMEM memory region, causing an error message in dmesg:
OF: reserved mem: OVERLAP DETECTED!
reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000)
This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +0 -0
index 79de9cc395c4..5e375ea73c79 100644
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
                      no-map;
              };

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 62

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +7 -2
 
-             removed_region: reserved@5000000 {
-                     reg = <0 0x05000000 0 0x2200000>;
+             reserved@5000000 {
+                     reg = <0x0 0x05000000 0x0 0x1a00000>;
+                     no-map;
+             };
+
+             reserved@6c00000 {
+                     reg = <0x0 0x06c00000 0x0 0x400000>;

I think you made this 0x200000 too small, unless there is supposed to be functional change.

Konrad

Quoted 3 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +0 -0
                      no-map;
              };
      };
Reviewed-by Tested-by on v1 1/1
#3 lore raw
In reply to Jamie Douglass

Hi Jamie,

Quoted 2 lines · Jamie Douglass

A previously committed reserved memory region was overlapping with the

IMHO there should be marked commit which you're fixing:

Fixes 22c7e1a0fa45 ("arm64: dts: msm8992-bullhead: add memory hole region")
Quoted 7 lines

SMEM memory region, causing an error message in dmesg:
OF: reserved mem: OVERLAP DETECTED! reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000)
This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

...

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 56

Quoted 8 lines

+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -2
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
                        no-map;
                };
 
-               removed_region: reserved@5000000 {
-                       reg = <0 0x05000000 0 0x2200000>;
+               reserved@5000000 {

Can we keep "removed_region:" ?
removed_region: reserved@5000000 {

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 61

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +5 -0
+                       reg = <0x0 0x05000000 0x0 0x1a00000>;
+                       no-map;
+               };
+
+               reserved@6c00000 {

Not sure which label to add, maybe append 2?
removed_region2: reserved@6c00000 {
@Konrad @Krzysztof WDYT?

Kind regards,
Petr

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -0
+                       reg = <0x0 0x06c00000 0x0 0x400000>;
                        no-map;
                };
        };
#4 lore raw
Quoted 8 lines · Petr Vorel

Hi Jamie,

Quoted 2 lines · Jamie Douglass

A previously committed reserved memory region was overlapping with the

IMHO there should be marked commit which you're fixing:

Fixes 22c7e1a0fa45 ("arm64: dts: msm8992-bullhead: add memory hole region")

Yes

Quoted 23 lines
Quoted 8 lines

SMEM memory region, causing an error message in dmesg:
OF: reserved mem: OVERLAP DETECTED! reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000)
This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

...

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 56

Quoted 8 lines

+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -2
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
                        no-map;
                };
 
-               removed_region: reserved@5000000 {
-                       reg = <0 0x05000000 0 0x2200000>;
+               reserved@5000000 {

Can we keep "removed_region:" ?
removed_region: reserved@5000000 {

Quoted 8 lines

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 61

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +5 -0
+                       reg = <0x0 0x05000000 0x0 0x1a00000>;
+                       no-map;
+               };
+
+               reserved@6c00000 {

Not sure which label to add, maybe append 2?
removed_region2: reserved@6c00000 {
@Konrad @Krzysztof WDYT?

Generally, if you don't expect that there'll be a need to amend/reference the node from somewhere else, the label is rather useless..

Konrad

Quoted 8 lines

Kind regards,
Petr

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -0
+                       reg = <0x0 0x06c00000 0x0 0x400000>;
                        no-map;
                };
        };
#5 lore raw
Quoted 42 lines · Konrad Dybcio
Quoted 8 lines · Petr Vorel

Hi Jamie,

Quoted 2 lines · Jamie Douglass

A previously committed reserved memory region was overlapping with the

IMHO there should be marked commit which you're fixing:

Fixes 22c7e1a0fa45 ("arm64: dts: msm8992-bullhead: add memory hole region")

Yes

Quoted 28 lines
Quoted 8 lines

SMEM memory region, causing an error message in dmesg:
OF: reserved mem: OVERLAP DETECTED! reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000)
This patch splits the previous reserved memory region into two reserved sections either side of the SMEM memory region.

...

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi cont_splash_mem: memory@3400000 { · line 56

Quoted 8 lines

+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi

arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -2
@@ -53,8 +53,13 @@ cont_splash_mem: memory@3400000 {
                        no-map;
                };
 
-               removed_region: reserved@5000000 {
-                       reg = <0 0x05000000 0 0x2200000>;
+               reserved@5000000 {

Can we keep "removed_region:" ?
removed_region: reserved@5000000 {

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +5 -0
+                       reg = <0x0 0x05000000 0x0 0x1a00000>;
+                       no-map;
+               };
+
+               reserved@6c00000 {
Quoted 6 lines
Quoted 3 lines

Not sure which label to add, maybe append 2?
removed_region2: reserved@6c00000 {
@Konrad @Krzysztof WDYT?

Generally, if you don't expect that there'll be a need to amend/reference the node from somewhere else, the label is rather useless..

Thank you for info. To be honest I have no idea. Previously the label was added, but that does not mean that it's used.
'git grep -l removed_region' shows only labels in few dts/dtsi, IMHO it's not used. IMHO it looks ok to avoid it.

Kind regards,
Petr

Quoted 11 lines

Konrad

Quoted 8 lines

Kind regards,
Petr

Quoted 4 lines
arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +1 -0
+                       reg = <0x0 0x06c00000 0x0 0x400000>;
                        no-map;
                };
        };