All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
@ 2023-01-28  5:52 Jamie Douglass
  2023-01-28 14:30 ` Konrad Dybcio
  2023-01-30 14:19 ` Petr Vorel
  0 siblings, 2 replies; 6+ messages in thread
From: Jamie Douglass @ 2023-01-28  5:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Petr Vorel,
	Dominik Kobinski, Konrad Dybico, 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.

Signed-off-by: Jamie Douglass <jamiemdouglass@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
index 79de9cc395c4..5e375ea73c79 100644
--- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
@@ -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;
 		};
 	};
-- 
2.25.1


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

* Re: [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
  2023-01-28  5:52 [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region Jamie Douglass
@ 2023-01-28 14:30 ` Konrad Dybcio
  2023-01-28 22:30   ` Jamie Douglass
  2023-01-30 14:19 ` Petr Vorel
  1 sibling, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2023-01-28 14:30 UTC (permalink / raw)
  To: Jamie Douglass, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Petr Vorel,
	Dominik Kobinski, Konrad Dybico



On 28.01.2023 06:52, Jamie Douglass wrote:
> 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.
> 
> Signed-off-by: Jamie Douglass <jamiemdouglass@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> index 79de9cc395c4..5e375ea73c79 100644
> --- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> @@ -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>;
I think you made this 0x200000 too small, unless there
is supposed to be functional change.

Konrad
>  			no-map;
>  		};
>  	};

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

* Re: [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
  2023-01-28 14:30 ` Konrad Dybcio
@ 2023-01-28 22:30   ` Jamie Douglass
  0 siblings, 0 replies; 6+ messages in thread
From: Jamie Douglass @ 2023-01-28 22:30 UTC (permalink / raw)
  To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Petr Vorel,
	Dominik Kobinski, Konrad Dybico

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


On Sun, 29 Jan 2023 at 01:30, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
>
>
> On 28.01.2023 06:52, Jamie Douglass wrote:
> > 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.
> >
> > Signed-off-by: Jamie Douglass <jamiemdouglass@gmail.com>
> > ---
> >  arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> > index 79de9cc395c4..5e375ea73c79 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> > @@ -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>;
> I think you made this 0x200000 too small, unless there
> is supposed to be functional change.
>
> Konrad
> >                       no-map;
> >               };
> >       };

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

* Re: [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
  2023-01-28  5:52 [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region Jamie Douglass
  2023-01-28 14:30 ` Konrad Dybcio
@ 2023-01-30 14:19 ` Petr Vorel
  2023-01-30 14:21   ` Konrad Dybcio
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2023-01-30 14:19 UTC (permalink / raw)
  To: Jamie Douglass
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Dominik Kobinski,
	Konrad Dybico

Hi Jamie,

On Sat, 28 Jan 2023 at 06:53, Jamie Douglass <jamiemdouglass@gmail.com> wrote:
>
> 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")

> 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.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
...
> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> @@ -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 {

> +                       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

> +                       reg = <0x0 0x06c00000 0x0 0x400000>;
>                         no-map;
>                 };
>         };

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

* Re: [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
  2023-01-30 14:19 ` Petr Vorel
@ 2023-01-30 14:21   ` Konrad Dybcio
  2023-01-30 15:03     ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2023-01-30 14:21 UTC (permalink / raw)
  To: Petr Vorel, Jamie Douglass
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Dominik Kobinski,
	Konrad Dybico



On 30.01.2023 15:19, Petr Vorel wrote:
> Hi Jamie,
> 
> On Sat, 28 Jan 2023 at 06:53, Jamie Douglass <jamiemdouglass@gmail.com> wrote:
>>
>> 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

> 
>> 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.
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Tested-by: Petr Vorel <pvorel@suse.cz>
> ...
>> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
>> @@ -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 {
> 
>> +                       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

> 
> Kind regards,
> Petr
> 
>> +                       reg = <0x0 0x06c00000 0x0 0x400000>;
>>                         no-map;
>>                 };
>>         };

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

* Re: [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region
  2023-01-30 14:21   ` Konrad Dybcio
@ 2023-01-30 15:03     ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2023-01-30 15:03 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Jamie Douglass, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Dominik Kobinski,
	Konrad Dybico

On Mon, 30 Jan 2023 at 15:21, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
>
>
> On 30.01.2023 15:19, Petr Vorel wrote:
> > Hi Jamie,
> >
> > On Sat, 28 Jan 2023 at 06:53, Jamie Douglass <jamiemdouglass@gmail.com> wrote:
> >>
> >> 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
>
> >
> >> 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.
> >
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Tested-by: Petr Vorel <pvorel@suse.cz>
> > ...
> >> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
> >> @@ -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 {
> >
> >> +                       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..

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

>
> Konrad
>
> >
> > Kind regards,
> > Petr
> >
> >> +                       reg = <0x0 0x06c00000 0x0 0x400000>;
> >>                         no-map;
> >>                 };
> >>         };

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

end of thread, other threads:[~2023-01-30 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28  5:52 [PATCH] arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlap with SMEM region Jamie Douglass
2023-01-28 14:30 ` Konrad Dybcio
2023-01-28 22:30   ` Jamie Douglass
2023-01-30 14:19 ` Petr Vorel
2023-01-30 14:21   ` Konrad Dybcio
2023-01-30 15:03     ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.