From: Julien Grall <julien.grall@arm.com>
To: Manish Jaggi <mjaggi@caviumnetworks.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andre Przywara <andre.przywara@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Punit Agrawal <punit.agrawal@arm.com>
Cc: nd@arm.com
Subject: Re: [RFC v2][PATCH] arm-acpi: Add ITS Support for Dom0
Date: Tue, 13 Jun 2017 12:58:19 +0100 [thread overview]
Message-ID: <abf6ede8-7501-5e8c-3b59-51a975a1368f@arm.com> (raw)
In-Reply-To: <e1242be2-b963-df5d-f0e7-e9676f834fb7@caviumnetworks.com>
On 13/06/17 12:44, Manish Jaggi wrote:
> On 6/13/2017 4:58 PM, Julien Grall wrote:
>> On 13/06/17 12:02, Manish Jaggi wrote:
>>>>> Will the below code be ok?
>>>>
>>>> If you noticed, I didn't say this code is wrong. Instead I asked why
>>>> you use the same ID. Meaning, is there anything in the DSDT requiring
>>>> this value?
>>>>
>>>>> + int tras_id = 0;
>>>>
>>>> unsigned.
>>>>
>>>>> + list_for_each_entry(its_data, &host_its_list, entry)
>>>>> + {
>>>>> + gic_its->translation_id = ++trans_id;
>>>>
>>>> You start the translation ID at 1. Why?
>>>>
>>> as per the ACPI spec the value should be unique to each GIC ITS unit.
>>> Does starting with 1 break anything? Or should I start with a magic
>>> number?
>>
>> Rather than arguing on the start value here, you should have first
>> answer to the question regarding the usage of translation_id.
> in v1 I assumed that it would be the same as read from host its tables,
> so it would have a unique value as programmed by host firmware.
>>
>> I understand that nobody is using it today. However, when I asked
>> around me nobody ruled out to any future usage of GIC ITS ID and
>> request this to be kept as it is.
>>
>> This means that you can simply copy over the ACPI tables. Rather
>> regenerating them.
>>
> I dont follow your comment, a bit confused
> In v1 you mentioned that "Please explain why you need to have the same
> ID as the host."
> now when you say we copy over the translation_id would be same as that
> of host?
Usually when I say: "Please explain..." it means I want more
documentation in the code because I am not sure to follow why it is
necessary. It does not mean "The code is wrong". If it was, I would have
clearly wrote it and give justification on it.
Furthermore, this kind of documentation will help a reader to understand
your code and avoid spending hours to find a justification.
The contributor should be able to justify any code he wrote and help the
reviewers to understand the patch quickly.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-06-13 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 13:03 [RFC v2][PATCH] arm-acpi: Add ITS Support for Dom0 Manish Jaggi
2017-06-08 13:58 ` Julien Grall
2017-06-09 6:48 ` Manish Jaggi
2017-06-09 8:39 ` Julien Grall
2017-06-13 11:02 ` Manish Jaggi
2017-06-13 11:28 ` Julien Grall
2017-06-13 11:44 ` Manish Jaggi
2017-06-13 11:58 ` Julien Grall [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=abf6ede8-7501-5e8c-3b59-51a975a1368f@arm.com \
--to=julien.grall@arm.com \
--cc=andre.przywara@arm.com \
--cc=mjaggi@caviumnetworks.com \
--cc=nd@arm.com \
--cc=punit.agrawal@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).