From: Yicong Yang <yangyicong@huawei.com>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
Junhao He <hejunhao3@huawei.com>
Cc: <will@kernel.org>, <linux-kernel@vger.kernel.org>,
<mark.rutland@arm.com>, <linux-arm-kernel@lists.infradead.org>,
<linux-doc@vger.kernel.org>, <yangyicong@huawei.com>,
<shenyang39@huawei.com>, <prime.zeng@hisilicon.com>,
<yangyicong@hisilicon.com>, Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH v2 2/3] drivers/perf: hisi: Add support for HiSilicon UC PMU driver
Date: Thu, 1 Jun 2023 14:53:55 +0800 [thread overview]
Message-ID: <17ff38e8-7965-8bba-5a4a-a28d219ea637@huawei.com> (raw)
In-Reply-To: <20230531165908.000022b0@Huawei.com>
On 2023/5/31 23:59, Jonathan Cameron wrote:
> On Wed, 31 May 2023 18:46:24 +0800
> Junhao He <hejunhao3@huawei.com> wrote:
>
> Hi Junhao,
>
> A few small comments inline.
>
>> On HiSilicon Hip09 platform, there is a UC (unified cache) module
>> on each chip SCCL (Super CPU Cluster). UC is a cache that provides
>> coherence between NUMA and UMA domains. It is located between L2
>> and Memory System. While PA uncore PMU model is the same as other
>> Hip09 PMU modules and many PMU events are supported.
>
> I don't follow what this sentence means. Normally you'd have
> While A, B is different..
>
>
>> Let's support
>> the PMU driver using the HiSilicon uncore PMU framework.
>>
>> * rd_req_en : rd_req_en is the abbreviation of read request tracetag enable
>> and allows user to count only read operations.
>> details are listed in the hisi-pmu document.
> Details are .. Also no need for the ine break
> and allows user to count only read operations. Details are listed
> in the hisi-pmu document at ....
>
>>
>> * srcid_en & srcid: allows user to filter statistics that come from
>
> Allows
> for consistency with the uring_channel description that follows.
>
>> specific CPU/ICL by configuration source ID.
>>
>> * uring_channel: Allows users to filter statistical information based on
>> the specified tx request uring channel.
>> uring_channel only supported events: [0x47 ~ 0x59].
>>
>> Signed-off-by: Junhao He <hejunhao3@huawei.com>
>
>
>> diff --git a/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c
>> new file mode 100644
>> index 000000000000..d27f28584fd7
>> --- /dev/null
>> +++ b/drivers/perf/hisilicon/hisi_uncore_uc_pmu.c
>> @@ -0,0 +1,577 @@
> ...
>
>
>
>
>> +static int hisi_uc_pmu_init_data(struct platform_device *pdev,
>> + struct hisi_pmu *uc_pmu)
>> +{
>> + /*
>> + * Use SCCL (Super CPU Cluster) ID and CCL (CPU Cluster) ID to
>> + * identify the topology information of UC PMU devices in the chip.
>> + */
>
>>From patch description, I'd assume there is only one of these
> per sccl so why do we care about the cluster level or the sub-id?
> Perhaps that description is missleading?
>
>> + if (device_property_read_u32(&pdev->dev, "hisilicon,scl-id",
>> + &uc_pmu->sccl_id)) {
>> + dev_err(&pdev->dev, "Can not read uc sccl-id!\n");
>> + return -EINVAL;
>> + }
>> +
>> + if (device_property_read_u32(&pdev->dev, "hisilicon,ccl-id",
>> + &uc_pmu->ccl_id)) {
>> + dev_err(&pdev->dev, "Can not read uc ccl-id!\n");
>> + return -EINVAL;
>> + }
>> +
>> + if (device_property_read_u32(&pdev->dev, "hisilicon,sub-id",
>> + &uc_pmu->sub_id)) {
>> + dev_err(&pdev->dev, "Can not read sub-id!\n");
>> + return -EINVAL;
>> + }
>> +
>> + uc_pmu->base = devm_platform_ioremap_resource(pdev, 0);
>> + if (IS_ERR(uc_pmu->base)) {
>> + dev_err(&pdev->dev, "ioremap failed for uc_pmu resource\n");
>> + return PTR_ERR(uc_pmu->base);
>> + }
>> +
>> + uc_pmu->identifier = readl(uc_pmu->base + HISI_UC_VERSION_REG);
>> +
>> + return 0;
>> +}
>
>
>> +static struct platform_driver hisi_uc_pmu_driver = {
>> + .driver = {
>> + .name = "hisi_uc_pmu",
>> + .acpi_match_table = hisi_uc_pmu_acpi_match,
>> + /*
>> + * We have not worked out a safe bind/unbind process,
>> + * so this is not supported yet.
>
> If you can reference more info on this that would be great.
> Perhaps a thread talking about why?
>
We handle like this from this patch,
https://lore.kernel.org/linux-arm-kernel/1594975763-32966-1-git-send-email-liuqi115@huawei.com/
>> + */
>> + .suppress_bind_attrs = true,
>> + },
>> + .probe = hisi_uc_pmu_probe,
>> +};
> .
>
next prev parent reply other threads:[~2023-06-01 6:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 10:46 [PATCH v2 0/3] Add support for HiSilicon SoC uncore PMU Junhao He
2023-05-31 10:46 ` [PATCH v2 1/3] drivers/perf: hisi: Add support for HiSilicon H60PA and PAv3 PMU driver Junhao He
2023-05-31 15:45 ` Jonathan Cameron
2023-06-01 6:40 ` Yicong Yang
2023-05-31 10:46 ` [PATCH v2 2/3] drivers/perf: hisi: Add support for HiSilicon UC " Junhao He
2023-05-31 15:59 ` Jonathan Cameron
2023-06-01 6:53 ` Yicong Yang [this message]
2023-06-07 11:00 ` hejunhao
2023-06-01 6:41 ` Yicong Yang
2023-05-31 10:46 ` [PATCH v2 3/3] docs: perf: Add new description for HiSilicon UC PMU Junhao He
2023-05-31 16:00 ` Jonathan Cameron
2023-06-01 6:44 ` Yicong Yang
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=17ff38e8-7965-8bba-5a4a-a28d219ea637@huawei.com \
--to=yangyicong@huawei.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=hejunhao3@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=shenyang39@huawei.com \
--cc=will@kernel.org \
--cc=yangyicong@hisilicon.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®