Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1712074 > unrolled thread
| Started by | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| First post | 2017-08-15 13:10 +0200 |
| Last post | 2017-08-17 05:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4 4/6] perf: hisi: Add support for HiSilicon SoC HHA PMU driver Mark Rutland <mark.rutland@arm.com> - 2017-08-15 13:10 +0200
Re: [PATCH v4 4/6] perf: hisi: Add support for HiSilicon SoC HHA PMU driver Zhangshaokun <zhangshaokun@hisilicon.com> - 2017-08-17 05:40 +0200
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Date | 2017-08-15 13:10 +0200 |
| Subject | Re: [PATCH v4 4/6] perf: hisi: Add support for HiSilicon SoC HHA PMU driver |
| Message-ID | <ueHTs-xi-15@gated-at.bofh.it> |
On Tue, Jul 25, 2017 at 08:10:40PM +0800, Shaokun Zhang wrote:
> +/* HHA register definition */
> +#define HHA_INT_MASK 0x0804
> +#define HHA_INT_STATUS 0x0808
> +#define HHA_INT_CLEAR 0x080C
> +#define HHA_PERF_CTRL 0x1E00
> +#define HHA_EVENT_CTRL 0x1E04
> +#define HHA_EVENT_TYPE0 0x1E80
> +#define HHA_CNT0_LOWER 0x1F00
> +
> +/* HHA has 16-counters and supports 0x50 events */
As with the L3C PMU, what exactly does this mean?
Does this mean event IDs 0-0x4f are valid?
[...]
> +static irqreturn_t hisi_hha_pmu_isr(int irq, void *dev_id)
> +{
> + struct hisi_pmu *hha_pmu = dev_id;
> + struct perf_event *event;
> + unsigned long overflown;
> + u32 status;
> + int idx;
> +
> + /* Read HHA_INT_STATUS register */
> + status = readl(hha_pmu->base + HHA_INT_STATUS);
> + if (!status)
> + return IRQ_NONE;
> + overflown = status;
No need for the u32 temporary here.
[....]
> +static int hisi_hha_pmu_dev_probe(struct platform_device *pdev,
> + struct hisi_pmu *hha_pmu)
> +{
> + struct device *dev = &pdev->dev;
> + int ret;
> +
> + ret = hisi_hha_pmu_init_data(pdev, hha_pmu);
> + if (ret)
> + return ret;
> +
> + /* Pick one core to use for cpumask attributes */
> + cpumask_set_cpu(smp_processor_id(), &hha_pmu->cpus);
> +
Why does this not have the usual event migration callbacks, across CPUs
in the same SCCL?
> + ret = hisi_hha_pmu_init_irq(hha_pmu, pdev);
> + if (ret)
> + return ret;
> +
> + hha_pmu->name = devm_kasprintf(dev, GFP_KERNEL, "hisi_hha%u_%u",
> + hha_pmu->hha_uid, hha_pmu->sccl_id);
As on the doc patch, this should be hierarchical.
Thanks,
Mark
[toc] | [next] | [standalone]
| From | Zhangshaokun <zhangshaokun@hisilicon.com> |
|---|---|
| Date | 2017-08-17 05:40 +0200 |
| Message-ID | <ufjP3-7vK-9@gated-at.bofh.it> |
| In reply to | #1712074 |
Hi Mark,
On 2017/8/15 19:05, Mark Rutland wrote:
> On Tue, Jul 25, 2017 at 08:10:40PM +0800, Shaokun Zhang wrote:
>> +/* HHA register definition */
>> +#define HHA_INT_MASK 0x0804
>> +#define HHA_INT_STATUS 0x0808
>> +#define HHA_INT_CLEAR 0x080C
>> +#define HHA_PERF_CTRL 0x1E00
>> +#define HHA_EVENT_CTRL 0x1E04
>> +#define HHA_EVENT_TYPE0 0x1E80
>> +#define HHA_CNT0_LOWER 0x1F00
>> +
>> +/* HHA has 16-counters and supports 0x50 events */
>
> As with the L3C PMU, what exactly does this mean?
>
> Does this mean event IDs 0-0x4f are valid?
>
It is the same as L3C PMU and it is event IDs.
> [...]
>
>> +static irqreturn_t hisi_hha_pmu_isr(int irq, void *dev_id)
>> +{
>> + struct hisi_pmu *hha_pmu = dev_id;
>> + struct perf_event *event;
>> + unsigned long overflown;
>> + u32 status;
>> + int idx;
>> +
>> + /* Read HHA_INT_STATUS register */
>> + status = readl(hha_pmu->base + HHA_INT_STATUS);
>> + if (!status)
>> + return IRQ_NONE;
>> + overflown = status;
>
> No need for the u32 temporary here.
>
Ok.
> [....]
>
>> +static int hisi_hha_pmu_dev_probe(struct platform_device *pdev,
>> + struct hisi_pmu *hha_pmu)
>> +{
>> + struct device *dev = &pdev->dev;
>> + int ret;
>> +
>> + ret = hisi_hha_pmu_init_data(pdev, hha_pmu);
>> + if (ret)
>> + return ret;
>> +
>> + /* Pick one core to use for cpumask attributes */
>> + cpumask_set_cpu(smp_processor_id(), &hha_pmu->cpus);
>> +
>
> Why does this not have the usual event migration callbacks, across CPUs
> in the same SCCL?
>
Sorry we missed this. Shall add CPU hotplug callbacks and handle the cpumask
update and event migration.
>> + ret = hisi_hha_pmu_init_irq(hha_pmu, pdev);
>> + if (ret)
>> + return ret;
>> +
>> + hha_pmu->name = devm_kasprintf(dev, GFP_KERNEL, "hisi_hha%u_%u",
>> + hha_pmu->hha_uid, hha_pmu->sccl_id);
>
> As on the doc patch, this should be hierarchical.
>
Surely.
Thanks,
Shaokun
> Thanks,
> Mark
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web