From: Robin Murphy <robin.murphy@arm.com>
To: Hanjun Guo <guohanjun@huawei.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Pankaj Bansal <pankaj.bansal@nxp.com>,
John Garry <john.garry@huawei.com>,
linuxarm@huawei.com, linux-acpi@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1] ACPI/IORT: Workaround for IORT ID count "minus one" issue
Date: Fri, 10 Jan 2020 10:51:12 +0000 [thread overview]
Message-ID: <1649ca0b-27c5-7365-2184-7ef95f210561@arm.com> (raw)
In-Reply-To: <4cee4a91-6459-819b-d4d4-f5e8899103b9@huawei.com>
On 2020-01-10 6:22 am, Hanjun Guo wrote:
> On 2020/1/10 0:02, Lorenzo Pieralisi wrote:
>> On Mon, Jan 06, 2020 at 05:19:32PM +0000, Robin Murphy wrote:
>>> On 30/12/2019 12:27 pm, Hanjun Guo wrote:
>>>> The IORT spec [0] says Number of IDs = The number of IDs in the range minus
>>>> one, it is confusing but it was written down in the first version of the
>>
>> Why is it confusing ? Because we botched the kernel code :) ?
>
> I think 'minus one' is not bringing any benefit :)
Well, in order to describe a 1:1 mapping of the entire possible ID
space, the alternative would have to be to overload the
otherwise-nonsensical value of 0 to mean 2^32, which I would argue is an
even more non-obvious inconsistency. Encoding strictly positive values
as 'value - 1' is a relatively common thing (at least in hardware design).
Robin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-01-10 10:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 12:27 [PATCH v1] ACPI/IORT: Workaround for IORT ID count "minus one" issue Hanjun Guo
2020-01-02 11:18 ` John Garry
2020-01-03 10:20 ` Hanjun Guo
2020-01-06 17:19 ` Robin Murphy
2020-01-07 12:03 ` Hanjun Guo
2020-01-09 16:02 ` Lorenzo Pieralisi
2020-01-10 6:22 ` Hanjun Guo
2020-01-10 10:39 ` Lorenzo Pieralisi
2020-01-10 10:51 ` Robin Murphy [this message]
2020-01-10 12:11 ` Lorenzo Pieralisi
2020-01-13 7:04 ` Hanjun Guo
2020-01-13 9:34 ` John Garry
2020-01-14 7:19 ` Hanjun Guo
2020-01-14 9:47 ` John Garry
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=1649ca0b-27c5-7365-2184-7ef95f210561@arm.com \
--to=robin.murphy@arm.com \
--cc=guohanjun@huawei.com \
--cc=john.garry@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=pankaj.bansal@nxp.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).