From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io
Cc: Chuong Tran <chuong@os.amperecomputing.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Nhi Pham <nhi@os.amperecomputing.com>,
Rebecca Cran <rebecca@os.amperecomputing.com>
Subject: [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read
Date: Tue, 17 Oct 2023 12:05:07 +0200 [thread overview]
Message-ID: <20231017100507.43573-1-lersek@redhat.com> (raw)
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 <chuong@os.amperecomputing.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Nhi Pham <nhi@os.amperecomputing.com>
Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
Suggested-by: Nhi Pham <nhi@os.amperecomputing.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
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 (#109669): https://edk2.groups.io/g/devel/message/109669
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]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2023-10-17 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 10:05 Laszlo Ersek [this message]
2023-10-17 10:06 ` [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read Rebecca Cran via groups.io
2023-10-17 11:38 ` Nhi Pham via groups.io
2023-10-17 11:59 ` Laszlo Ersek
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-list 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=20231017100507.43573-1-lersek@redhat.com \
--to=devel@edk2.groups.io \
/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