From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: tuanphan@amperemail.onmicrosoft.com
Cc: mark.rutland@arm.com, tuanphan@os.amperecomputing.com,
linux-kernel@vger.kernel.org, sudeep.holla@arm.com,
patches@amperecomputing.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] perf: arm_dsu: Support DSU ACPI devices.
Date: Fri, 20 Mar 2020 10:27:51 +0000 [thread overview]
Message-ID: <ba33d1fa-1afb-941b-0961-dc2394af03c6@arm.com> (raw)
In-Reply-To: <64AE7BB3-F2A9-4A62-82FD-FFF2D6B7101C@amperemail.onmicrosoft.com>
Hi Tuan
On 03/19/2020 10:49 PM, Tuan Phan wrote:
> Hi Suzuki,
>
>> On Mar 18, 2020, at 5:45 PM, Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>
>> Hello,
>>
>>
>> Please find my comments below.
>>
>> On 03/18/2020 12:28 AM, Tuan Phan wrote:
>>> Add support for probing device from ACPI node.
>>> Each DSU ACPI node defines "cpus" package which
>>> each element is the MPIDR of associated cpu.
>>> Signed-off-by: Tuan Phan <tuanphan@os.amperecomputing.com>
...
>>> +#else /* CONFIG_ACPI */
>>> + int i, cpu, ret;
>>> + const union acpi_object *obj;
>>> + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
>>> + struct dsu_pmu *dsu_pmu =
>>> + (struct dsu_pmu *) platform_get_drvdata(pdev);
>>> +
>>
>>> + ret = acpi_dev_get_property(adev, "cpus", ACPI_TYPE_ANY, &obj);
>>
>> Is the binding documented somewhere ?
>>
>>
>> nit: Also, why not :
>> ret = acpi_dev_get_propert(adev, "cpus", ACPI_TYPE_PACKAGE, &obj);
>> if (ret < 0)
>> return ret;
>> ?
> => I couldn’t find the device tree binding document of DSU anywhere. Is It enough
The DT bindings are here :
Documentation/devicetree/bindings/arm/arm-dsu-pmu.txt
> to put a comment describing the acpi binding in the code or need somewhere else?
The concern here is that we are simply trying to replicate the DT
binding here, especially replacing the CPU phandles with MPIDRs.
I am not an expert in the ACPI bindings, but I prefer ACPI
phandle reference to the CPUs (which is much simpler) to
MPIDRs (which is not that intuitive). And this is the same message
that I got from our ACPI folks.
Irrespective of what we end up with, this must be part of the "ACPI
bindings" document here :
DEN0093 - Generic ACPI for Arm Components x.y Platform Design Document
So that everybody uses the same bindings irrespective of the OS.
You don't need to document the bindings here with the Linux kernel code.
Kind regards
Suzuki
prev parent reply other threads:[~2020-03-20 10:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 0:28 Tuan Phan
2020-03-18 10:27 ` Robin Murphy
2020-03-19 0:45 ` Suzuki K Poulose
2020-03-19 2:42 ` Tuan Phan
2020-03-19 22:49 ` Tuan Phan
2020-03-20 10:27 ` Suzuki K Poulose [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-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=ba33d1fa-1afb-941b-0961-dc2394af03c6@arm.com \
--to=suzuki.poulose@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=patches@amperecomputing.com \
--cc=sudeep.holla@arm.com \
--cc=tuanphan@amperemail.onmicrosoft.com \
--cc=tuanphan@os.amperecomputing.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
all inboxes | Powered by JetHome®