imx8m: Use a sane SYS_MALLOC_F_LEN default
PATCH v2 1/1 imx8m: Use a sane SYS_MALLOC_F_LEN default
From: Fabio Estevam <[email protected]>
When adding new features to imx8m boards, such as DM clock support, the malloc area can be exhausted.
To avoid such issue, provide a reasonable default for the SYS_MALLOC_F_LEN size.
---
Changes since v1:
- Add the imx8m default inside the main Kconfig - Heinrich
Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Kconfig +2 -1
@@ -232,10 +232,11 @@ config SYS_MALLOC_F_LEN depends on SYS_MALLOC_F default 0x1000 if AM33XX default 0x4000 if SANDBOX - default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ + default 0x2000 if (ARCH_IMX8 || ARCH_MX7 || \ ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \ ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL) + default 0x10000 if ARCH_IMX8M default 0x400 help Before relocation, memory is very limited on many platforms. Still,
Signature · 1 line
2.25.1
Quoted 22 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
When adding new features to imx8m boards, such as DM clock support, the malloc area can be exhausted.
To avoid such issue, provide a reasonable default for the
SYS_MALLOC_F_LENsize.Suggested-by Heinrich Schuchardt <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Add the imx8m default inside the mainKconfig- HeinrichKconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Kconfig +0
-0
Kconfig config SYS_MALLOC_F_LEN · line 239
Quoted 9 lines
Kconfig +2
-1@@ -232,10 +232,11 @@ config SYS_MALLOC_F_LEN depends on SYS_MALLOC_F default 0x1000 if AM33XX default 0x4000 if SANDBOX - default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ + default 0x2000 if (ARCH_IMX8 || ARCH_MX7 || \ ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \ ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL) + default 0x10000 if ARCH_IMX8M
It should probably also cover the rest of imx8, and how close to you think imx6 is? And, git grep'ing I see a bunch of layerscape also overriding this with something larger.
Signature · 1 line
Tom
Quoted 3 lines · Tom Rini
It should probably also cover the rest of imx8, and how close to you think imx6 is? And, git grep'ing I see a bunch of layerscape also overriding this with something larger.
I am not comfortable in changing imx8qxp/imx8qm/layerscape as I cannot test them.
Quoted 8 lines · Fabio Estevam
Quoted 3 lines · Tom Rini
It should probably also cover the rest of imx8, and how close to you think imx6 is? And, git grep'ing I see a bunch of layerscape also overriding this with something larger.
I am not comfortable in changing imx8qxp/imx8qm/layerscape as I cannot test them.
Well, this will be for -next, and we can get some more people on the patch list, and this seems to be an area where everyone is either:
- Kicking the value up a bit for themselves
- Having hard to figure out problems booting the platform because it's too small a value until they see someone else picked a larger value.
So lets raise these a bit and get some acks, please.
Signature · 1 line
Tom
Adam Ford
Tested-byQuoted 11 lines · Tom Rini
Quoted 8 lines · Fabio Estevam
Quoted 3 lines · Tom Rini
It should probably also cover the rest of imx8, and how close to you think imx6 is? And, git grep'ing I see a bunch of layerscape also overriding this with something larger.
I am not comfortable in changing imx8qxp/imx8qm/layerscape as I cannot test them.
Quoted 7 lines
Well, this will be for -next, and we can get some more people on the patch list, and this seems to be an area where everyone is either:
- Kicking the value up a bit for themselves
- Having hard to figure out problems booting the platform because it's too small a value until they see someone else picked a larger value.So lets raise these a bit and get some acks, please.
In both cases, after 'make savedefconfig' the updated defconfig file removed the entry to SYS_MALLOC_F_LEN since it was already the same value.
Thanks for doing that!
adam
Quoted 3 lines
--
Tom
Hi Tom,
Quoted 7 lines · Tom Rini
Well, this will be for -next, and we can get some more people on the patch list, and this seems to be an area where everyone is either:
- Kicking the value up a bit for themselves
- Having hard to figure out problems booting the platform because it's too small a value until they see someone else picked a larger value.So lets raise these a bit and get some acks, please.
Sure, I sent a v3 as requested.
Hi Fabio,
Am Mi., 23. März 2022 um 17:10 Uhr schrieb Fabio Estevam <[email protected]>:
Quoted 11 lines
From: Fabio Estevam <[email protected]>
When adding new features to imx8m boards, such as DM clock support, the malloc area can be exhausted.
To avoid such issue, provide a reasonable default for the
SYS_MALLOC_F_LENsize.Suggested-by Heinrich Schuchardt <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
I tested this on an imx8mq board (kontron_pitx_imx8m_defconfig).
Quoted 27 lines
---
Changes since v1:
- Add the imx8m default inside the mainKconfig- HeinrichKconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Kconfig +2
-2@@ -232,10 +232,11 @@ config SYS_MALLOC_F_LEN depends on SYS_MALLOC_F default 0x1000 if AM33XX default 0x4000 if SANDBOX - default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \ + default 0x2000 if (ARCH_IMX8 || ARCH_MX7 || \ ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \ ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL) + default 0x10000 if ARCH_IMX8M default 0x400 help Before relocation, memory is very limited on many platforms. Still, --2.25.1
Signature · 1 line
Heiko