From patchwork Mon Dec 11 18:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1874674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GGby8TSL; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=LF5qDB4T; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SpqVN2QtPz20Gv for ; Tue, 12 Dec 2023 05:08:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qFz+tGGE2Z3GAnkZ6OtOG59GFY6WUSlhtdBmoB2uazI=; b=GGby8TSLj5Obb5 Ogk0XRqPlX95rC2xaudzh+dm9IY04wWzpP1RAvw0v2K3g5njGFZcvRYzLkBDA3BTATiURrXMnvI/L tzWx7eLPCRH/kQnkBJzgz0qf7nxNURjFHdvlTgXF3gqkHmyHo/bOCOgqC/N4c3ln2l32JA6U2TcNC 3SFEeiRXgeY3o48lVR63mPGkz3sQfbeFOWLtafRtOcEuJMZxOXXh12+CDKkz0ojE20gmHCiat4VAc tHBz938SsvwwjPqsUyv4LkKnKcJEmLUXcoAxEMFp6JoEedqVXW0h20ktw/Crd6eYY2rEjlW8XUXfo i0Fx0eUzY3Iz/1h9qa6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rCkhC-006hLC-2w; Mon, 11 Dec 2023 18:07:59 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rCkh5-006hFt-30 for opensbi@lists.infradead.org; Mon, 11 Dec 2023 18:07:53 +0000 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5c66e7eafabso3961519a12.0 for ; Mon, 11 Dec 2023 10:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1702318070; x=1702922870; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4VMqve1x28el1rvquabTNUbkQ/CGXWRP9Ll7bOLC41w=; b=LF5qDB4TaZmv/tIYBMTKZhEbNM/FMbslmwLeFWOuMMWRT39VKFZ0OifpKeEeW+yf6x E8FPDg+73211d5/5H/h3wOanjgRrCjzmGUvRlWgtrWRmCKQCM5riiFfGUqPtwl79IDlC sbKQyTii1HXTPRLo4cFCzAXxPntXncf4bu/ZZXpUti9w2KyF+p3zrIbR4O98qnYq45yF 0bVZeZK9cCMHYs2fJ0ljAR3qvh82nei6g1Quf8ZrNpoD2V6LkR5D3gmIfya+NfAFcKRj w3gJIDiXQpsVzbY1AyGA8jPTufT8ljcmauEWGxKY5HIcipVCBCUaBJhdkZEs8urbrtye 5LZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702318070; x=1702922870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4VMqve1x28el1rvquabTNUbkQ/CGXWRP9Ll7bOLC41w=; b=ImZg4AAsXamSQCeZDJAc6meZW5qPmbaa1Iye1Mcq+12meSzdwCKQm8eucOPGA5quX4 yMAt37/CLq4xUXn6zBE0qOvFlbcVTPQMqc8r7T82K8T3upIwsbR/c/Wa7/aEiUc/j6Kf Hf/1qfF16pIFbepuRve01hXLnYcZVbKPOhOW9WOhhb2STsO2ZNp2ULFRCCyQVPpL19Nf QFnoitH0+ihJg5oFbB+hC/4B3Ed0JT0g2e1ITP8FtkjoIlRcY1F4oeG6R3+Av7R0enOe TpZ1/++QwV6QtCl4i4UcP28ugupCZoh0+fBKDmrUa/nHJv9GPfsOXSQiVnVqy/bxWW6M 8rhg== X-Gm-Message-State: AOJu0YwuLgXMlm9RY83CdHi5MVK4tjSPz6nwT3OfAudcTMZhYPAURPtQ 9XGF0fd1zVn+kNxA4/QGqPWVkw== X-Google-Smtp-Source: AGHT+IHz4xyohBsvHTOlGI8s2Q4tfemIgD2JJ4rO1kvhojsXBi0LPyv6Pi6mX5M/xfD4HVF60O58oQ== X-Received: by 2002:a17:90a:7105:b0:286:6cc0:cadd with SMTP id h5-20020a17090a710500b002866cc0caddmr3833167pjk.84.1702318070450; Mon, 11 Dec 2023 10:07:50 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([171.76.86.12]) by smtp.gmail.com with ESMTPSA id u15-20020a17090ae00f00b002800e0b4852sm8641641pjy.22.2023.12.11.10.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 10:07:50 -0800 (PST) From: Anup Patel To: Atish Patra Cc: Andrew Jones , Anup Patel , opensbi@lists.infradead.org, Anup Patel Subject: [PATCH 2/5] platform: generic: Fine tune fw_platform_calculate_heap_size() Date: Mon, 11 Dec 2023 23:37:35 +0530 Message-Id: <20231211180738.891727-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231211180738.891727-1-apatel@ventanamicro.com> References: <20231211180738.891727-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231211_100752_041164_C3D44A42 X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 --- platform/generic/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:530 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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 #include #include +#include #include #include #include @@ -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); }