From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ilkka Koskinen <ilkka@os.amperecomputing.com>,
Krishna chaitanya chundru <quic_krichai@quicinc.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision
Date: Wed, 11 Dec 2024 09:24:09 +0800 [thread overview]
Message-ID: <f8786f53-eff0-4fd7-9c4d-c5733f648c6e@linux.alibaba.com> (raw)
In-Reply-To: <20241210145335.GA3239578@bhelgaas>
在 2024/12/10 22:53, Bjorn Helgaas 写道:
> On Tue, Dec 10, 2024 at 08:04:17PM +0800, Shuai Xue wrote:
>> 在 2024/12/10 06:29, Bjorn Helgaas 写道:
>>> From: Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> PCI Vendor-Specific (VSEC) Capabilities are defined by each vendor.
>>> Devices from different vendors may advertise a VSEC Capability with the DWC
>>> RAS DES functionality, but the vendors may assign different VSEC IDs.
>>>
>>> Search for the DWC RAS DES Capability using the VSEC ID and VSEC Rev
>>> chosen by the vendor.
>
>>> - for (vid = dwc_pcie_vendor_ids; vid->vendor_id; vid++) {
>>> + for (vid = dwc_pcie_pmu_vsec_ids; vid->vendor_id; vid++) {
>>
>> How about checking the pdev->vendor with vid->vendor_id before
>> search the vesc cap?
>>
>> + if (pdev->vendor != vid->vendor_id)
>> + continue;
>
> Every user of VSEC needs to specify the (Vendor ID, VSEC ID) and
> verify that the Vendor ID matches the device Vendor ID, so
> pci_find_vsec_capability() does this check internally, so I don't
> think we need to do it here.
I see. LGTM. Also, I quickly tested it on Yitian 710 and it works as expected.
Reviewed-and-tested-by: Shuai Xue <xueshuai@linux.alibaba.com>
Thanks.
Best Regards,
Shuai
next prev parent reply other threads:[~2024-12-11 1:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 22:29 [PATCH] perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision Bjorn Helgaas
2024-12-10 12:04 ` Shuai Xue
2024-12-10 14:53 ` Bjorn Helgaas
2024-12-11 1:24 ` Shuai Xue [this message]
2024-12-11 0:55 ` Ilkka Koskinen
2024-12-11 23:44 ` Will Deacon
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-all 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=f8786f53-eff0-4fd7-9c4d-c5733f648c6e@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=ilkka@os.amperecomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=quic_krichai@quicinc.com \
--cc=will@kernel.org \
/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