linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
@ 2020-10-04  5:50 Phil Chang
  2020-10-04 13:05 ` Chun-Kuang Hu
  2020-10-05 13:44 ` Rob Herring
  0 siblings, 2 replies; 7+ messages in thread
From: Phil Chang @ 2020-10-04  5:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Frank Rowand, Matthias Brugger, devicetree,
	linux-kernel, linux-mediatek, Phil Chang, YJ Chiang, Alix Wu,
	Joe Liu

Certain SoCs need to support large amount of reserved memory
regions, especially to follow the GKI rules from Google.
In MTK new SoC requires more than 68 regions of reserved memory
for each IP's usage, such as load firmware to specific sapce,
so that need to reserve more regisions 

Signed-off-by: Joe Liu <joe.liu@mediatek.com>
Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
Signed-off-by: Alix Wu <alix.wu@mediatek.com>
Signed-off-by: Phil Chang <phil.chang@mediatek.com>
---
 drivers/of/of_reserved_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 46b9371c8a33..595f0741dcef 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -22,7 +22,7 @@
 #include <linux/slab.h>
 #include <linux/memblock.h>
 
-#define MAX_RESERVED_REGIONS	64
+#define MAX_RESERVED_REGIONS	128
 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
 static int reserved_mem_count;
 
-- 
2.18.0

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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-04  5:50 [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions Phil Chang
@ 2020-10-04 13:05 ` Chun-Kuang Hu
  2020-10-05 17:17   ` Phil Chang
  2020-10-05 13:44 ` Rob Herring
  1 sibling, 1 reply; 7+ messages in thread
From: Chun-Kuang Hu @ 2020-10-04 13:05 UTC (permalink / raw)
  To: Phil Chang
  Cc: Linux ARM, DTML, Alix Wu, YJ Chiang, linux-kernel, Rob Herring,
	moderated list:ARM/Mediatek SoC support, Matthias Brugger,
	Joe Liu, Frank Rowand

Hi, Phil:

Phil Chang <phil.chang@mediatek.com> 於 2020年10月4日 週日 下午1:51寫道:
>
> Certain SoCs need to support large amount of reserved memory
> regions, especially to follow the GKI rules from Google.
> In MTK new SoC requires more than 68 regions of reserved memory
> for each IP's usage, such as load firmware to specific sapce,

space

> so that need to reserve more regisions

regions.

I guess this requirement is from Mediatek SoC, but I find below device
tree and just find one reserved memory region,

arch/arm64/boot/dts/mediatek/mt7622.dtsi
arch/arm64/boot/dts/mediatek/mt8173.dtsi
arch/arm64/boot/dts/mediatek/mt8516.dtsi

Could you show me the 68 regions?

Regards,
Chun-Kuang.

>
> Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> ---
>  drivers/of/of_reserved_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 46b9371c8a33..595f0741dcef 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -22,7 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/memblock.h>
>
> -#define MAX_RESERVED_REGIONS   64
> +#define MAX_RESERVED_REGIONS   128
>  static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
>  static int reserved_mem_count;
>
> --
> 2.18.0
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-04  5:50 [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions Phil Chang
  2020-10-04 13:05 ` Chun-Kuang Hu
@ 2020-10-05 13:44 ` Rob Herring
  2020-10-05 15:12   ` Chun-Kuang Hu
  1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2020-10-05 13:44 UTC (permalink / raw)
  To: Phil Chang
  Cc: linux-arm-kernel, Frank Rowand, Matthias Brugger, devicetree,
	linux-kernel, moderated list:ARM/Mediatek SoC support, YJ Chiang,
	Alix Wu, Joe Liu

On Sun, Oct 4, 2020 at 12:50 AM Phil Chang <phil.chang@mediatek.com> wrote:
>
> Certain SoCs need to support large amount of reserved memory
> regions, especially to follow the GKI rules from Google.
> In MTK new SoC requires more than 68 regions of reserved memory
> for each IP's usage, such as load firmware to specific sapce,

typo

> so that need to reserve more regisions

typo. Missing punctuation.

>
> Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> ---
>  drivers/of/of_reserved_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 46b9371c8a33..595f0741dcef 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -22,7 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/memblock.h>
>
> -#define MAX_RESERVED_REGIONS   64
> +#define MAX_RESERVED_REGIONS   128

At some point, this starts to feel like abuse of reserved regions.
Please provide details on what the regions are.

Also, this probably just needs to be dynamic. I think we're at that point.

Rob

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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-05 13:44 ` Rob Herring
@ 2020-10-05 15:12   ` Chun-Kuang Hu
  0 siblings, 0 replies; 7+ messages in thread
From: Chun-Kuang Hu @ 2020-10-05 15:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Phil Chang, DTML, Alix Wu, YJ Chiang, linux-kernel, Joe Liu,
	moderated list:ARM/Mediatek SoC support, Matthias Brugger,
	Frank Rowand, linux-arm-kernel

Hi, Rob:

Rob Herring <robh+dt@kernel.org> 於 2020年10月5日 週一 下午9:45寫道:
>
> On Sun, Oct 4, 2020 at 12:50 AM Phil Chang <phil.chang@mediatek.com> wrote:
> >
> > Certain SoCs need to support large amount of reserved memory
> > regions, especially to follow the GKI rules from Google.
> > In MTK new SoC requires more than 68 regions of reserved memory
> > for each IP's usage, such as load firmware to specific sapce,
>
> typo
>
> > so that need to reserve more regisions
>
> typo. Missing punctuation.
>
> >
> > Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> > Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> > Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> > Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> > ---
> >  drivers/of/of_reserved_mem.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> > index 46b9371c8a33..595f0741dcef 100644
> > --- a/drivers/of/of_reserved_mem.c
> > +++ b/drivers/of/of_reserved_mem.c
> > @@ -22,7 +22,7 @@
> >  #include <linux/slab.h>
> >  #include <linux/memblock.h>
> >
> > -#define MAX_RESERVED_REGIONS   64
> > +#define MAX_RESERVED_REGIONS   128
>
> At some point, this starts to feel like abuse of reserved regions.
> Please provide details on what the regions are.
>
> Also, this probably just needs to be dynamic. I think we're at that point.

How about using a config like DRM_FBDEV_OVERALLOC [1] ?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/Kconfig?h=v5.9-rc8#n125

Regards,
Chun-Kuang.

>
> Rob
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-04 13:05 ` Chun-Kuang Hu
@ 2020-10-05 17:17   ` Phil Chang
  2020-10-05 18:57     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Chang @ 2020-10-05 17:17 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Linux ARM, DTML, Alix Wu, YJ Chiang, linux-kernel, Rob Herring,
	moderated list:ARM/Mediatek SoC support, Matthias Brugger,
	Joe Liu, Frank Rowand

Hi Chun-Kuang

Sorry for typo. In fact, the dts of new SoC is not upstream yet. I'm so
sorry for couldn't show the detail now.

How about the configurable MAX_RESERVED_REGIONS size like this patch?
https://patchwork.kernel.org/patch/10692101/

 
On Sun, 2020-10-04 at 21:05 +0800, Chun-Kuang Hu wrote:
> Hi, Phil:
> 
> Phil Chang <phil.chang@mediatek.com> 於 2020年10月4日 週日 下午1:51寫道:
> >
> > Certain SoCs need to support large amount of reserved memory
> > regions, especially to follow the GKI rules from Google.
> > In MTK new SoC requires more than 68 regions of reserved memory
> > for each IP's usage, such as load firmware to specific sapce,
> 
> space
> 
> > so that need to reserve more regisions
> 
> regions.
> 
> I guess this requirement is from Mediatek SoC, but I find below device
> tree and just find one reserved memory region,
> 
> arch/arm64/boot/dts/mediatek/mt7622.dtsi
> arch/arm64/boot/dts/mediatek/mt8173.dtsi
> arch/arm64/boot/dts/mediatek/mt8516.dtsi
> 
> Could you show me the 68 regions?
> 
> Regards,
> Chun-Kuang.
> 
> >
> > Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> > Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> > Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> > Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> > ---
> >  drivers/of/of_reserved_mem.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> > index 46b9371c8a33..595f0741dcef 100644
> > --- a/drivers/of/of_reserved_mem.c
> > +++ b/drivers/of/of_reserved_mem.c
> > @@ -22,7 +22,7 @@
> >  #include <linux/slab.h>
> >  #include <linux/memblock.h>
> >
> > -#define MAX_RESERVED_REGIONS   64
> > +#define MAX_RESERVED_REGIONS   128
> >  static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
> >  static int reserved_mem_count;
> >
> > --
> > 2.18.0
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek


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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-05 17:17   ` Phil Chang
@ 2020-10-05 18:57     ` Rob Herring
  2020-10-05 23:16       ` Chun-Kuang Hu
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2020-10-05 18:57 UTC (permalink / raw)
  To: Phil Chang
  Cc: Chun-Kuang Hu, Linux ARM, DTML, Alix Wu, YJ Chiang, linux-kernel,
	moderated list:ARM/Mediatek SoC support, Matthias Brugger,
	Joe Liu, Frank Rowand

On Mon, Oct 5, 2020 at 12:17 PM Phil Chang <phil.chang@mediatek.com> wrote:
>
> Hi Chun-Kuang

Please don't top post to the lists.

> Sorry for typo. In fact, the dts of new SoC is not upstream yet. I'm so
> sorry for couldn't show the detail now.

Don't have to have the dts upstream. Can you point to a downstream dts
or post a snippet of the reserved memory?

> How about the configurable MAX_RESERVED_REGIONS size like this patch?
> https://patchwork.kernel.org/patch/10692101/

No, as I already said in that patch. But glad you found what's needed
to make it dynamic. But even for dynamic, I want to understand the
use.

Rob

>
>
> On Sun, 2020-10-04 at 21:05 +0800, Chun-Kuang Hu wrote:
> > Hi, Phil:
> >
> > Phil Chang <phil.chang@mediatek.com> 於 2020年10月4日 週日 下午1:51寫道:
> > >
> > > Certain SoCs need to support large amount of reserved memory
> > > regions, especially to follow the GKI rules from Google.
> > > In MTK new SoC requires more than 68 regions of reserved memory
> > > for each IP's usage, such as load firmware to specific sapce,
> >
> > space
> >
> > > so that need to reserve more regisions
> >
> > regions.
> >
> > I guess this requirement is from Mediatek SoC, but I find below device
> > tree and just find one reserved memory region,
> >
> > arch/arm64/boot/dts/mediatek/mt7622.dtsi
> > arch/arm64/boot/dts/mediatek/mt8173.dtsi
> > arch/arm64/boot/dts/mediatek/mt8516.dtsi
> >
> > Could you show me the 68 regions?
> >
> > Regards,
> > Chun-Kuang.
> >
> > >
> > > Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> > > Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> > > Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> > > Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> > > ---
> > >  drivers/of/of_reserved_mem.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> > > index 46b9371c8a33..595f0741dcef 100644
> > > --- a/drivers/of/of_reserved_mem.c
> > > +++ b/drivers/of/of_reserved_mem.c
> > > @@ -22,7 +22,7 @@
> > >  #include <linux/slab.h>
> > >  #include <linux/memblock.h>
> > >
> > > -#define MAX_RESERVED_REGIONS   64
> > > +#define MAX_RESERVED_REGIONS   128
> > >  static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
> > >  static int reserved_mem_count;
> > >
> > > --
> > > 2.18.0
> > > _______________________________________________
> > > Linux-mediatek mailing list
> > > Linux-mediatek@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
>

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

* Re: [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions
  2020-10-05 18:57     ` Rob Herring
@ 2020-10-05 23:16       ` Chun-Kuang Hu
  0 siblings, 0 replies; 7+ messages in thread
From: Chun-Kuang Hu @ 2020-10-05 23:16 UTC (permalink / raw)
  To: Rob Herring
  Cc: Phil Chang, Chun-Kuang Hu, Linux ARM, DTML, Alix Wu, YJ Chiang,
	linux-kernel, moderated list:ARM/Mediatek SoC support,
	Matthias Brugger, Joe Liu, Frank Rowand

Rob Herring <robh+dt@kernel.org> 於 2020年10月6日 週二 上午2:57寫道:
>
> On Mon, Oct 5, 2020 at 12:17 PM Phil Chang <phil.chang@mediatek.com> wrote:
> >
> > Hi Chun-Kuang
>
> Please don't top post to the lists.
>
> > Sorry for typo. In fact, the dts of new SoC is not upstream yet. I'm so
> > sorry for couldn't show the detail now.
>
> Don't have to have the dts upstream. Can you point to a downstream dts
> or post a snippet of the reserved memory?
>
> > How about the configurable MAX_RESERVED_REGIONS size like this patch?
> > https://patchwork.kernel.org/patch/10692101/
>
> No, as I already said in that patch. But glad you found what's needed
> to make it dynamic. But even for dynamic, I want to understand the
> use.

I get the point. We should prevent too many config. If this
information could be get from dts, we should not get it from config.
Agree that WHY of this patch is more important than HOW of this patch.

Regards,
Chun-Kuang.

>
> Rob
>
> >
> >
> > On Sun, 2020-10-04 at 21:05 +0800, Chun-Kuang Hu wrote:
> > > Hi, Phil:
> > >
> > > Phil Chang <phil.chang@mediatek.com> 於 2020年10月4日 週日 下午1:51寫道:
> > > >
> > > > Certain SoCs need to support large amount of reserved memory
> > > > regions, especially to follow the GKI rules from Google.
> > > > In MTK new SoC requires more than 68 regions of reserved memory
> > > > for each IP's usage, such as load firmware to specific sapce,
> > >
> > > space
> > >
> > > > so that need to reserve more regisions
> > >
> > > regions.
> > >
> > > I guess this requirement is from Mediatek SoC, but I find below device
> > > tree and just find one reserved memory region,
> > >
> > > arch/arm64/boot/dts/mediatek/mt7622.dtsi
> > > arch/arm64/boot/dts/mediatek/mt8173.dtsi
> > > arch/arm64/boot/dts/mediatek/mt8516.dtsi
> > >
> > > Could you show me the 68 regions?
> > >
> > > Regards,
> > > Chun-Kuang.
> > >
> > > >
> > > > Signed-off-by: Joe Liu <joe.liu@mediatek.com>
> > > > Signed-off-by: YJ Chiang <yj.chiang@mediatek.com>
> > > > Signed-off-by: Alix Wu <alix.wu@mediatek.com>
> > > > Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> > > > ---
> > > >  drivers/of/of_reserved_mem.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> > > > index 46b9371c8a33..595f0741dcef 100644
> > > > --- a/drivers/of/of_reserved_mem.c
> > > > +++ b/drivers/of/of_reserved_mem.c
> > > > @@ -22,7 +22,7 @@
> > > >  #include <linux/slab.h>
> > > >  #include <linux/memblock.h>
> > > >
> > > > -#define MAX_RESERVED_REGIONS   64
> > > > +#define MAX_RESERVED_REGIONS   128
> > > >  static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
> > > >  static int reserved_mem_count;
> > > >
> > > > --
> > > > 2.18.0
> > > > _______________________________________________
> > > > Linux-mediatek mailing list
> > > > Linux-mediatek@lists.infradead.org
> > > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
> >

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

end of thread, other threads:[~2020-10-05 23:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04  5:50 [PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions Phil Chang
2020-10-04 13:05 ` Chun-Kuang Hu
2020-10-05 17:17   ` Phil Chang
2020-10-05 18:57     ` Rob Herring
2020-10-05 23:16       ` Chun-Kuang Hu
2020-10-05 13:44 ` Rob Herring
2020-10-05 15:12   ` Chun-Kuang Hu

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