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 8DD79941419 for ; Tue, 17 Oct 2023 11:59:57 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MbxHQUQy7PIyUxApoAndtW/EgFUGj5dsVFraGQrey/E=; 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=1697543996; v=1; b=mOL/TWIoJEw2blWenrFFW9Sx8dUWFwVa5jGZLqHJ3HIt2BkK1XO3La1zfqX2ezkOgiIUWo1F i8yEqtcUXBKbGSX4jIaYsNBhFnz/mdjC70rNq/vDgnQdx4Zd/jh71/v2XCjHkO6L6dK911zKwVH TVm8U/EEwQ7WUuO18D+wdrrI= X-Received: by 127.0.0.2 with SMTP id Agp4YY7687511xEcgdhsGoVG; Tue, 17 Oct 2023 04:59:56 -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.211059.1697543995379039722 for ; Tue, 17 Oct 2023 04:59:55 -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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-606-zWjhJycsNYSKSDxxswGtaw-1; Tue, 17 Oct 2023 07:59:48 -0400 X-MC-Unique: zWjhJycsNYSKSDxxswGtaw-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F82081D9EF; Tue, 17 Oct 2023 11:59:48 +0000 (UTC) X-Received: from [10.39.193.132] (unknown [10.39.193.132]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77C222166B26; Tue, 17 Oct 2023 11:59:47 +0000 (UTC) Message-ID: <5a1a17a6-69dd-3859-28ce-7ee809c5daa6@redhat.com> Date: Tue, 17 Oct 2023 13:59:46 +0200 MIME-Version: 1.0 Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read To: nhi@os.amperecomputing.com, Rebecca Cran Cc: Chuong Tran , Leif Lindholm , edk2-devel-groups-io References: <20231017100507.43573-1-lersek@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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: UKSdERs1s0fe7MJ67TvakgcCx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="mOL/TWIo"; 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/17/23 13:38, Nhi Pham via groups.io wrote: > Thanks, Laszlo for this patch. > > Reviewed-by: Nhi Pham > > Regards, > Nhi Thank you both for reviewing; commit 7f3e7fc0b4ed. Laszlo > > On 10/17/2023 5:05 PM, Laszlo Ersek via groups.io wrote: >> Nhi says that reading LINK_CONTROL_LINK_STATUS_REG is redundant; its only >> use was debugging (before commit 380b4b40c60d). Thus, we can go farther >> than commit 2e27c62ef000, and remove the MmioRead32() call altogether. >> >> Build-tested with "Jade.dsc". >> >> Cc: Chuong Tran >> Cc: Leif Lindholm >> Cc: Nhi Pham >> Cc: Rebecca Cran >> Suggested-by: Nhi Pham >> Signed-off-by: Laszlo Ersek >> --- >>   Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 --- >>   1 file changed, 3 deletions(-) >> >> diff --git >> a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c >> b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c >> index fa00c1e36999..dea2e6406dfd 100644 >> --- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c >> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c >> @@ -1744,7 +1744,6 @@ Ac01PcieCoreUpdateLink ( >>     ) >>   { >>     AC01_PCIE_CONTROLLER      *Pcie; >> -  PHYSICAL_ADDRESS          CfgBase; >>     UINT8                     PcieIndex; >>     UINT32                    Index; >>   @@ -1761,12 +1760,10 @@ Ac01PcieCoreUpdateLink ( >>     // Loop for all controllers >>     for (PcieIndex = 0; PcieIndex < RootComplex->MaxPcieController; >> PcieIndex++) { >>       Pcie = &RootComplex->Pcie[PcieIndex]; >> -    CfgBase = RootComplex->MmcfgBase + >> (RootComplex->Pcie[PcieIndex].DevNum << DEV_SHIFT); >>         if (Pcie->Active && !Pcie->LinkUp) { >>         if (PcieLinkUpCheck (Pcie)) { >>           Pcie->LinkUp = TRUE; >> -        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + >> LINK_CONTROL_LINK_STATUS_REG); >>             // Doing link checking and recovery if needed >>           Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex); >> >> >> >> >> > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109676): https://edk2.groups.io/g/devel/message/109676 Mute This Topic: https://groups.io/mt/102014532/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-