From patchwork Tue May 23 09:46:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 1785019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=bG7q13vb; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Q8UZ5YEg; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQTxh4LBKz20Pr for ; Tue, 23 May 2023 19:47:20 +1000 (AEST) 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=ys7m50XQVCnGJP6QDxYprzFi0QralfN5SyNT/bXzqJ0=; b=bG7q13vbbwiSrf IU68enuMBCikh33TuDNo6w7ygvySGXDnFeTGj+66/d2AdWQ2RWhTzPGidsC5bPjKdmMCG2I3NWYYr 7iEsRUP3bgR6Iik12al+o/KEAfpP7zJj0SkBNye3Ci/m/QwPUfl77IplD6bCuWB8CiDl9hZLC5eMX 7vIMnUQ3hlX5RDnIR1tf1cmXRDuHT2/xYks7n9jkB79adDGy0dfdk//nQipGMW3m7GfzuRLmvfhOs SHBRpAPywQHCiQLnuTvWNbR+jveR9fhlrwA9ijVmwULTcvOKRdn3fF4rebmA6kdN5iBSjE2C2k+no s5KN0HfISpEJQUPl9yvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1Obl-009fVV-0a; Tue, 23 May 2023 09:47:09 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1Obh-009fUk-2O for opensbi@lists.infradead.org; Tue, 23 May 2023 09:47:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AD2560916; Tue, 23 May 2023 09:47:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64AD3C4339B; Tue, 23 May 2023 09:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684835224; bh=Ph8oxRpxMG6L37BV68KV2GSn08RFdRoPEzK6cJfvgN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q8UZ5YEgfNGtaSBuFEOmivzXp896hTOGWyrVsfQtROqhk5S4ymdTwRK8h2BPM13W6 eJQ/2E3N4gNYRerbA8hUR/WrP60wUDUVQbpaYH+M79f/pZoZ0ryjhbpk8vNQuCJiuo TZwMAr/zESaWK0kQQn6rDYRl00ge9952M5Sb2shchtJkDgnivSD7p/1U+D4vHY0UuT wRd0WOZaL/yZY6on6UE2dcNepmNpBiNw0Zkue5utQr0YMUEYtegYvymwajNyrFYf0D tinl88CpftrJXjZLa4cIxNswGBXFIwYc+z8Bk6MHB0niVSTbtc3334RdtlQ9N25XxX kJ58N2wQO20Zw== From: guoren@kernel.org To: inochiama@outlook.com, jszhang@kernel.org, wefu@redhat.com Cc: opensbi@lists.infradead.org, Guo Ren , Guo Ren Subject: [RFC PATCH 1/2] lib: reset: thead: Remove unnecessary fence operations Date: Tue, 23 May 2023 05:46:48 -0400 Message-Id: <20230523094649.4100554-2-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230523094649.4100554-1-guoren@kernel.org> References: <20230523094649.4100554-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230523_024705_819148_B8718110 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.4 (-----) 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: From: Guo Ren There are no load/store operations to fence at the reset point. Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- lib/utils/reset/fdt_reset_thead.c | 1 - lib/utils/reset/fdt_reset_thead_asm.S | 2 -- 2 files changed, 3 [...] Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [139.178.84.217 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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 From: Guo Ren There are no load/store operations to fence at the reset point. Signed-off-by: Guo Ren Signed-off-by: Guo Ren --- lib/utils/reset/fdt_reset_thead.c | 1 - lib/utils/reset/fdt_reset_thead_asm.S | 2 -- 2 files changed, 3 deletions(-) diff --git a/lib/utils/reset/fdt_reset_thead.c b/lib/utils/reset/fdt_reset_thead.c index e1d6885debae..ff7d2981b42f 100644 --- a/lib/utils/reset/fdt_reset_thead.c +++ b/lib/utils/reset/fdt_reset_thead.c @@ -27,7 +27,6 @@ static void clone_csrs(int cnt) /* Mask csr BIT[31 - 20] */ *(u32 *)&__fdt_reset_thead_csrr &= BIT(20) - 1; - smp_mb(); /* Write csr BIT[31 - 20] to __fdt_reset_thead_csrr */ *(u32 *)&__fdt_reset_thead_csrr |= custom_csr[i].index << 20; diff --git a/lib/utils/reset/fdt_reset_thead_asm.S b/lib/utils/reset/fdt_reset_thead_asm.S index 8237951fd82d..650f8585cdd2 100644 --- a/lib/utils/reset/fdt_reset_thead_asm.S +++ b/lib/utils/reset/fdt_reset_thead_asm.S @@ -27,7 +27,6 @@ __thead_pre_start_warm: */ li t1, 0x70013 csrw 0x7c2, t1 - fence rw,rw lla t1, custom_csr @@ -43,5 +42,4 @@ __reset_thead_csr_stub: */ li t1, 0x70013 csrw 0x7c2, t1 - fence rw,rw j _start_warm