public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran via groups.io" <rebecca=os.amperecomputing.com@groups.io>
To: Laszlo Ersek <lersek@redhat.com>, devel@edk2.groups.io
Cc: Chuong Tran <chuong@os.amperecomputing.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Nhi Pham <nhi@os.amperecomputing.com>
Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read
Date: Tue, 17 Oct 2023 04:06:50 -0600	[thread overview]
Message-ID: <912d1ff6-1bca-4eae-8007-cae4ba11022d@os.amperecomputing.com> (raw)
In-Reply-To: <20231017100507.43573-1-lersek@redhat.com>

On 10/17/2023 4:05 AM, Laszlo Ersek 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 <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);

Reviewed-by: Rebecca Cran <rebecca@os.amperecomputing.com>

-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109670): https://edk2.groups.io/g/devel/message/109670
Mute This Topic: https://groups.io/mt/102014532/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-10-17 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 10:05 [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read Laszlo Ersek
2023-10-17 10:06 ` Rebecca Cran via groups.io [this message]
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=912d1ff6-1bca-4eae-8007-cae4ba11022d@os.amperecomputing.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