From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 439267803D9 for ; Tue, 24 Oct 2023 12:34:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=7WRfwQC91qywlqHO7xY2kdzhZbjlI0dB9UrBGZUPA2Y=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698150850; v=1; b=do/tS4KC4j8+dHTqbvrkSvkLcfSh6EpvkUKEXeeAapnXuBHDe9/xhYH5R2cDRHU/CUqDtoaq pZ4e8/Giv+BocHEFd3QUus1kBgywaazwPtF/nHgg+sS4drp37QzDW87d8PGXExA/lQB6Ix8Rbmq H+ulByTzi5Gk5Hud1NJipHlw= X-Received: by 127.0.0.2 with SMTP id skZbYY7687511x34BmNPgfkZ; Tue, 24 Oct 2023 05:34:10 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.16802.1698150850268554251 for ; Tue, 24 Oct 2023 05:34:10 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-396-fg9bElbuMSKqwQPkKALJ7Q-1; Tue, 24 Oct 2023 08:34:06 -0400 X-MC-Unique: fg9bElbuMSKqwQPkKALJ7Q-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0D4F85C1A6; Tue, 24 Oct 2023 12:34:05 +0000 (UTC) X-Received: from [10.39.195.39] (unknown [10.39.195.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E54E1121318; Tue, 24 Oct 2023 12:34:04 +0000 (UTC) Message-ID: <4dc465d6-768f-701d-d60b-4140f4e96568@redhat.com> Date: Tue, 24 Oct 2023 14:34:03 +0200 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v6 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op To: devel@edk2.groups.io, dhaval@rivosinc.com Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Sunil V L , Daniel Schaefer References: <20231021173314.19363-1-dhaval@rivosinc.com> <20231021173314.19363-3-dhaval@rivosinc.com> From: "Laszlo Ersek" In-Reply-To: <20231021173314.19363-3-dhaval@rivosinc.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: VVjBfdnsdmcBeM23hfwaxkCsx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="do/tS4KC"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 10/21/23 19:33, Dhaval Sharma wrote: > There are different ways to manage cache on RISC-V Processors. > One way is to use fence instruction. Another way is to use CPU > specific cache management operation instructions ratified as > per RISC-V ISA specifications to be introduced in future > patches. Current method is fence instruction based, rename the > function accordingly to add that clarity. >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Sunil V L > Cc: Daniel Schaefer > Cc: Laszlo Ersek >=20 > Signed-off-by: Dhaval Sharma > --- >=20 > Notes: > V6: > - As part of restructuring, adding cache instruction differentiation > in function naming >=20 > MdePkg/Include/Library/BaseLib.h | 4 ++-- > MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 4 ++-- > MdePkg/Library/BaseLib/RiscV64/FlushCache.S | 8 ++++---- > 3 files changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/Ba= seLib.h > index 7142bbfa42f2..d4b56a9601da 100644 > --- a/MdePkg/Include/Library/BaseLib.h > +++ b/MdePkg/Include/Library/BaseLib.h > @@ -212,7 +212,7 @@ RiscVClearPendingTimerInterrupt ( > **/ > VOID > EFIAPI > -RiscVInvalidateInstCacheAsm ( > +RiscVInvalidateInstCacheAsmFence ( > VOID > ); > =20 > @@ -222,7 +222,7 @@ RiscVInvalidateInstCacheAsm ( > **/ > VOID > EFIAPI > -RiscVInvalidateDataCacheAsm ( > +RiscVInvalidateDataCacheAsmFence ( > VOID > ); > =20 > diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg= /Library/BaseCacheMaintenanceLib/RiscVCache.c > index d5efcf49a4bf..4eb18edb9aa7 100644 > --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c > +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c > @@ -21,7 +21,7 @@ InvalidateInstructionCache ( > VOID > ) > { > - RiscVInvalidateInstCacheAsm (); > + RiscVInvalidateInstCacheAsmFence (); > } > =20 > /** > @@ -193,7 +193,7 @@ InvalidateDataCache ( > VOID > ) > { > - RiscVInvalidateDataCacheAsm (); > + RiscVInvalidateDataCacheAsmFence (); > } > =20 > /** > diff --git a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S b/MdePkg/Library= /BaseLib/RiscV64/FlushCache.S > index 7c10fdd268af..e0eea0b5fb25 100644 > --- a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S > +++ b/MdePkg/Library/BaseLib/RiscV64/FlushCache.S > @@ -9,13 +9,13 @@ > //----------------------------------------------------------------------= -------- > =20 > .align 3 > -ASM_GLOBAL ASM_PFX(RiscVInvalidateInstCacheAsm) > -ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsm) > +ASM_GLOBAL ASM_PFX(RiscVInvalidateInstCacheAsmFence) > +ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsmFence) > =20 > -ASM_PFX(RiscVInvalidateInstCacheAsm): > +ASM_PFX(RiscVInvalidateInstCacheAsmFence): > fence.i > ret > =20 > -ASM_PFX(RiscVInvalidateDataCacheAsm): > +ASM_PFX(RiscVInvalidateDataCacheAsmFence): > fence > ret Reviewed-by: Laszlo Ersek -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110002): https://edk2.groups.io/g/devel/message/110002 Mute This Topic: https://groups.io/mt/102103778/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-