mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com>,
	kaishen@linux.alibaba.com, helgaas@kernel.org,
	yangyicong@huawei.com, will@kernel.org,
	Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com,
	robin.murphy@arm.com, chengyou@linux.alibaba.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
	rdunlap@infradead.org, mark.rutland@arm.com,
	zhuo.song@linux.alibaba.com, renyu.zj@linux.alibaba.com
Subject: Re: [PATCH v10 4/5] drivers/perf: add DesignWare PCIe PMU driver
Date: Thu, 16 Nov 2023 11:02:20 -0800 (PST)	[thread overview]
Message-ID: <f18a97f0-a629-21c2-a772-b098262629e5@os.amperecomputing.com> (raw)
In-Reply-To: <7e383d7f-8df5-4d49-a45e-3dbe23b2c925@linux.alibaba.com>

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]



On Thu, 16 Nov 2023, Shuai Xue wrote:
> On 2023/11/16 11:50, Ilkka Koskinen wrote:
>>> +static int dwc_pcie_pmu_probe(struct platform_device *plat_dev)
>>> +{
>>> +    struct pci_dev *pdev = plat_dev->dev.platform_data;
>>> +    struct dwc_pcie_pmu *pcie_pmu;
>>> +    char *name;
>>> +    u32 bdf, val;
>>> +    u16 vsec;
>>> +    int ret;
>>> +
>>> +    vsec = pci_find_vsec_capability(pdev, PCI_VENDOR_ID_ALIBABA,
>>> +                    DWC_PCIE_VSEC_RAS_DES_ID);
>>
>> You nicely changed to use vendor list in this version but here the driver still tries to find Alibaba specific capability.
>
> Sorry, I missed here.
>
>> I guess, you could search again using the vendor list. The other option would be to make dwc_pcie_match_des_cap() to return the vendor id, pass it to dwc_pcie_register_dev(), which would add it to device's platform data with
>> the pointer to the pci device.
>
> The dwc_pcie_pmu_probe() is called by device which has DWC_PCIE_VSEC_RAS_DES_ID cap.
> So I guess I can use pdev->vendor directly here, e.g?
>
> 	pci_find_vsec_capability(pdev, pdev->vendor, DWC_PCIE_VSEC_RAS_DES_ID);


Oh, right. That seems correct.

Cheers, Ilkka

>
> Best Regards,
> Shuai
>

  reply	other threads:[~2023-11-16 19:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04 13:32 [PATCH v10 0/5] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-11-04 13:32 ` [PATCH v10 1/5] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-11-04 13:32 ` [PATCH v10 2/5] PCI: Add Alibaba Vendor ID to linux/pci_ids.h Shuai Xue
2023-11-04 13:32 ` [PATCH v10 3/5] PCI: move pci_clear_and_set_dword helper to pci header Shuai Xue
2023-11-07 15:03   ` Bjorn Helgaas
2023-11-08  0:51     ` Shuai Xue
2023-11-04 13:32 ` [PATCH v10 4/5] drivers/perf: add DesignWare PCIe PMU driver Shuai Xue
2023-11-15  0:07   ` Ilkka Koskinen
2023-11-15  1:26     ` Shuai Xue
2023-11-16  0:48       ` Ilkka Koskinen
2023-11-16  3:50   ` Ilkka Koskinen
2023-11-16  8:02     ` Shuai Xue
2023-11-16 19:02       ` Ilkka Koskinen [this message]
2023-11-04 13:32 ` [PATCH v10 5/5] MAINTAINERS: add maintainers for " Shuai Xue
2023-11-16  0:57 ` [PATCH v10 0/5] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Ilkka Koskinen
2023-11-16  1:49   ` Shuai Xue
2023-11-16  2:42     ` Ilkka Koskinen

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=f18a97f0-a629-21c2-a772-b098262629e5@os.amperecomputing.com \
    --to=ilkka@os.amperecomputing.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chengyou@linux.alibaba.com \
    --cc=helgaas@kernel.org \
    --cc=kaishen@linux.alibaba.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=rdunlap@infradead.org \
    --cc=renyu.zj@linux.alibaba.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    --cc=yangyicong@huawei.com \
    --cc=zhuo.song@linux.alibaba.com \
    /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

all inboxes | Powered by JetHome®