U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] riscv: alloc space exhausted
@ 2022-04-05 14:47 Heinrich Schuchardt
  2022-04-05 18:00 ` Tom Rini
       [not found] ` <HK0PR03MB2994DD123FDF6C9D1C7EA71CC1E79@HK0PR03MB2994.apcprd03.prod.outlook.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2022-04-05 14:47 UTC (permalink / raw)
  To: Rick Chen, Leo; +Cc: u-boot, Tom Rini, Fabio Estevam, Heinrich Schuchardt

When trying to run qemu-riscv64_smode_defconfig with 32 harts booting
fails. The debug UART shows a message

    alloc space exhausted

32 is the current maximum number of harts for machine virt in QEMU 7.0.

Raise the default for SYS_MALLOC_F_LEN to 16 KiB.

Move the setting to /Kconfig where we define SYS_MALLOC_F_LEN for
other architectures too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	move the setting to /Kconfig
---
 Kconfig            | 2 +-
 arch/riscv/Kconfig | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/Kconfig b/Kconfig
index 112745440b..678317e4d3 100644
--- a/Kconfig
+++ b/Kconfig
@@ -248,7 +248,7 @@ config SYS_MALLOC_F_LEN
 	hex "Size of malloc() pool before relocation"
 	depends on SYS_MALLOC_F
 	default 0x1000 if AM33XX
-	default 0x4000 if SANDBOX
+	default 0x4000 if SANDBOX || RISCV
 	default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
 			   ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
 			   ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index ba29e70acf..78e964db12 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -195,9 +195,6 @@ config ANDES_PLIC
 	  The Andes PLIC block holds memory-mapped claim and pending registers
 	  associated with software interrupt.
 
-config SYS_MALLOC_F_LEN
-	default 0x1000
-
 config SMP
 	bool "Symmetric Multi-Processing"
 	depends on SBI_V01 || !RISCV_SMODE
-- 
2.34.1


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

* Re: [PATCH v2 1/1] riscv: alloc space exhausted
  2022-04-05 14:47 [PATCH v2 1/1] riscv: alloc space exhausted Heinrich Schuchardt
@ 2022-04-05 18:00 ` Tom Rini
       [not found] ` <HK0PR03MB2994DD123FDF6C9D1C7EA71CC1E79@HK0PR03MB2994.apcprd03.prod.outlook.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-04-05 18:00 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Rick Chen, Leo, u-boot, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On Tue, Apr 05, 2022 at 04:47:15PM +0200, Heinrich Schuchardt wrote:

> When trying to run qemu-riscv64_smode_defconfig with 32 harts booting
> fails. The debug UART shows a message
> 
>     alloc space exhausted
> 
> 32 is the current maximum number of harts for machine virt in QEMU 7.0.
> 
> Raise the default for SYS_MALLOC_F_LEN to 16 KiB.
> 
> Move the setting to /Kconfig where we define SYS_MALLOC_F_LEN for
> other architectures too.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH v2 1/1] riscv: alloc space exhausted
       [not found] ` <HK0PR03MB2994DD123FDF6C9D1C7EA71CC1E79@HK0PR03MB2994.apcprd03.prod.outlook.com>
@ 2022-04-06  0:51   ` Rick Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Rick Chen @ 2022-04-06  0:51 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: U-Boot Mailing List, Tom Rini, festevam, Leo Liang, rick

> From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Sent: Tuesday, April 05, 2022 10:47 PM
> To: Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Leo Yu-Chi Liang(梁育齊) <ycliang@andestech.com>
> Cc: u-boot@lists.denx.de; Tom Rini <trini@konsulko.com>; Fabio Estevam <festevam@gmail.com>; Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Subject: [PATCH v2 1/1] riscv: alloc space exhausted
>
> When trying to run qemu-riscv64_smode_defconfig with 32 harts booting fails. The debug UART shows a message
>
>     alloc space exhausted
>
> 32 is the current maximum number of harts for machine virt in QEMU 7.0.
>
> Raise the default for SYS_MALLOC_F_LEN to 16 KiB.
>
> Move the setting to /Kconfig where we define SYS_MALLOC_F_LEN for other architectures too.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         move the setting to /Kconfig
> ---
>  Kconfig            | 2 +-
>  arch/riscv/Kconfig | 3 ---
>  2 files changed, 1 insertion(+), 4 deletions(-)

Reviewed-by: Rick Chen <rick@andestech.com>

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

end of thread, other threads:[~2022-04-06  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-05 14:47 [PATCH v2 1/1] riscv: alloc space exhausted Heinrich Schuchardt
2022-04-05 18:00 ` Tom Rini
     [not found] ` <HK0PR03MB2994DD123FDF6C9D1C7EA71CC1E79@HK0PR03MB2994.apcprd03.prod.outlook.com>
2022-04-06  0:51   ` Rick Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox