From: Anup Patel <apatel@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2 2/6] platform: generic: Fine tune fw_platform_calculate_heap_size()
Date: Tue, 12 Dec 2023 15:29:22 +0530 [thread overview]
Message-ID: <20231212095926.13371-3-apatel@ventanamicro.com> (raw)
In-Reply-To: <20231212095926.13371-1-apatel@ventanamicro.com>
Let's use SBI_TLB_INFO_SIZE instead of hard-coded 0x40 in
fw_platform_calculate_heap_size() to fine tune the heap size
required for per-hart TLB fifos.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
platform/generic/platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/platform/generic/platform.c b/platform/generic/platform.c
index 08ae92a..8507227 100644
--- a/platform/generic/platform.c
+++ b/platform/generic/platform.c
@@ -16,6 +16,7 @@
#include <sbi/sbi_platform.h>
#include <sbi/sbi_string.h>
#include <sbi/sbi_system.h>
+#include <sbi/sbi_tlb.h>
#include <sbi_utils/fdt/fdt_domain.h>
#include <sbi_utils/fdt/fdt_fixup.h>
#include <sbi_utils/fdt/fdt_helper.h>
@@ -63,7 +64,7 @@ static u32 fw_platform_calculate_heap_size(u32 hart_count)
heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(hart_count);
/* For TLB fifo */
- heap_size += 0x40 * (hart_count) * (hart_count);
+ heap_size += SBI_TLB_INFO_SIZE * (hart_count) * (hart_count);
return BIT_ALIGN(heap_size, HEAP_BASE_ALIGN);
}
--
2.34.1
next prev parent reply other threads:[~2023-12-12 9:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 9:59 [PATCH v2 0/6] Assorted improvements Anup Patel
2023-12-12 9:59 ` [PATCH v2 1/6] lib: sbi_tlb: Reduce size of struct sbi_tlb_info Anup Patel
2023-12-12 9:59 ` Anup Patel [this message]
2023-12-12 9:59 ` [PATCH v2 3/6] lib: utils/irqchip: Add shared MMIO region for PLIC in root domain Anup Patel
2023-12-12 9:59 ` [PATCH v2 4/6] lib: sbi: Allow ecall handlers to directly update register state Anup Patel
2023-12-12 9:59 ` [PATCH v2 5/6] lib: sbi: Remove the SBI_ETRAP error code Anup Patel
2023-12-12 9:59 ` [PATCH v2 6/6] lib: sbi: Do not enter OpenSBI with mseccfg.MML == 1 Anup Patel
2023-12-19 13:54 ` [PATCH v2 0/6] Assorted improvements Anup Patel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212095926.13371-3-apatel@ventanamicro.com \
--to=apatel@ventanamicro.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox