diff mbox series

[1/2] platform: ensure enough heap size with debug triggers extension

Message ID 20240916072516.628461-1-inochiama@gmail.com
State Superseded
Headers show
Series platform: improve heap size handle | expand

Commit Message

Inochi Amaoto Sept. 16, 2024, 7:25 a.m. UTC
DBTR introduce a big heap allocation to store hart state, this is
allocated percpu and needs big space when CPU number is high.

Increase the percpu part to fix this problem, and decrease the
fixed part to avoid too big heap size.

Fixes: 97f234f (lib: sbi: Introduce the SBI debug triggers extension support)
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
 include/sbi/sbi_platform.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang W Sept. 20, 2024, 5:33 a.m. UTC | #1
在 2024-09-16星期一的 15:25 +0800,Inochi Amaoto写道:
> DBTR introduce a big heap allocation to store hart state, this is
> allocated percpu and needs big space when CPU number is high.
> 
> Increase the percpu part to fix this problem, and decrease the
> fixed part to avoid too big heap size.
> 
> Fixes: 97f234f (lib: sbi: Introduce the SBI debug triggers extension support)
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>

LGTM

Reviewed-by: Xiang W <wxjstz@126.com>

> ---
>  include/sbi/sbi_platform.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
> index 7b3ac4b..d1c556c 100644
> --- a/include/sbi/sbi_platform.h
> +++ b/include/sbi/sbi_platform.h
> @@ -152,7 +152,7 @@ struct sbi_platform_operations {
>  
>  /** Platform default heap size */
>  #define SBI_PLATFORM_DEFAULT_HEAP_SIZE(__num_hart)	\
> -					(0x8000 + 0x800 * (__num_hart))
> +					(0x4000 + 0x2000 * (__num_hart))
>  
>  /** Representation of a platform */
>  struct sbi_platform {
diff mbox series

Patch

diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index 7b3ac4b..d1c556c 100644
--- a/include/sbi/sbi_platform.h
+++ b/include/sbi/sbi_platform.h
@@ -152,7 +152,7 @@  struct sbi_platform_operations {
 
 /** Platform default heap size */
 #define SBI_PLATFORM_DEFAULT_HEAP_SIZE(__num_hart)	\
-					(0x8000 + 0x800 * (__num_hart))
+					(0x4000 + 0x2000 * (__num_hart))
 
 /** Representation of a platform */
 struct sbi_platform {