public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: nhi@os.amperecomputing.com,
	Rebecca Cran <rebecca@os.amperecomputing.com>
Cc: Chuong Tran <chuong@os.amperecomputing.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read
Date: Tue, 17 Oct 2023 13:59:46 +0200	[thread overview]
Message-ID: <5a1a17a6-69dd-3859-28ce-7ee809c5daa6@redhat.com> (raw)
In-Reply-To: <dc4c2e0c-4666-4ddd-94c7-fefaece50e07@os.amperecomputing.com>

On 10/17/23 13:38, Nhi Pham via groups.io wrote:
> Thanks, Laszlo for this patch.
> 
> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>
> 
> 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 <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 (#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]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-10-17 11:59 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
2023-10-17 11:38 ` Nhi Pham via groups.io
2023-10-17 11:59   ` Laszlo Ersek [this message]

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=5a1a17a6-69dd-3859-28ce-7ee809c5daa6@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