From: Ashwin Chaugule <ashwin.chaugule@linaro.org>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Mark Brown <broonie@kernel.org>, "lv.zheng" <lv.zheng@intel.com>,
"linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>,
Patch Tracking <patches@linaro.org>,
linux acpi <linux-acpi@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v10 1/1] Mailbox: Add support for Platform Communication Channel
Date: Mon, 10 Nov 2014 08:53:27 -0500 [thread overview]
Message-ID: <CAJ5Y-eZa4zukM4ai3n7Ei86PLaaCoF_w4PqFzAdrojg_rOGdig@mail.gmail.com> (raw)
In-Reply-To: <CAJe_Zhd1q=3r6So7XRYuAi9NSQvabpiuLqPiLpReoiFzUjX9QA@mail.gmail.com>
On 10 November 2014 08:39, Jassi Brar <jaswinder.singh@linaro.org> wrote:
> On 10 November 2014 18:27, Ashwin Chaugule <ashwin.chaugule@linaro.org> wrote:
>> On 9 November 2014 23:13, Jassi Brar <jaswinder.singh@linaro.org> wrote:
>>>
>>>>>> based on the discussions that followed since, we decided that its best
>>>>>> to add a separate PCC lookup and registration API. The main reason
>>>>>> being, we dont have a way to list all mbox providers in ACPI in a way
>>>>>> that DT does. e.g. in DT, the client->dev is used to look up mbox
>>>>>> controllers. In ACPI, a client cant specify which mbox controllers to
>>>>>> associate with, if it can attach to multiple. With the PCC specific
>>>>>> API, if the client calls it, the controller knows where to look,
>>>>>> because that lookup is PCC specific.
>>>>>>
>>>>>> In your patch, the assumption that PCC is the only ACPI mbox provider,
>>>>>> maybe true today, but that can change anytime.
>>>>>>
>>>>> Please read my patch again, we can have ACPI as well as DT populated
>>>>> clients. All that you intend to do with this patch can be done there
>>>>> and _without_ adding new apis.
>>>>
>>>> Read it again. Not arguing that your patch wont work for DT and ACPI,
>>>> but your assumption that ACPI supports PCC as the only mbox
>>>> controller, may not hold true. The global_xlate function will work
>>>> fine for PCC, but may not work for other ACPI (non-DT) mbox
>>>> controllers. Using the signature field/index byte works only for PCC.
>>>> We've already been through this discussion with Mark and Arnd and we
>>>> came up with the PCC API.
>>>>
>>> Please read it yet again. There is no assumption that PCC is the only
>>> mbox in ACPI (though I think that is very likely). The function and
>>> its argument are both named _global_. 'Signature' is mentioned only as
>>> an example in case of PCC. The PCC controller driver could expect the
>>> global_id to be 'signature' of the subspace, similarly another non-DT
>>> mailbox controller driver will expect its own different 'signature'
>>> (say 0xdead0000 | id_16bits). In the patch I submitted we try
>>> .global_xlate() of all such mboxes and only one, which finds its
>>> id-space specified, will return a channel.
>>>
>>> Ideally, global-id space isn't very clean, but for mailbox we anyway
>>> have to have a direct understanding between controller and client
>>> drivers. So having global IDs is a great tradeoff if we avoid messing
>>> up the api.
>>
>> How is this different than expecting the client to pass a string name
>> of the mbox controller it wants?
>>
> Global-ID is ugly, string matching is uglier. String matching requires
> changes to client and provider structures as opposed to simple
> numerical comparison to find a suitable channel.
And both have the problem that we cant guarantee uniqueness [1][2].
Having a separate API solves this problem.
Ashwin
[1] - http://www.spinics.net/lists/linux-acpi/msg52271.html
[2] - http://www.spinics.net/lists/linux-acpi/msg52377.html
next prev parent reply other threads:[~2014-11-10 13:53 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 14:52 [PATCH v10 0/1] PCC: Platform Communication Channel Ashwin Chaugule
2014-11-07 14:52 ` [PATCH v10 1/1] Mailbox: Add support for " Ashwin Chaugule
2014-11-09 13:48 ` Jassi Brar
2014-11-09 15:20 ` Ashwin Chaugule
2014-11-09 16:18 ` Jassi Brar
2014-11-09 17:22 ` Ashwin Chaugule
2014-11-10 4:13 ` Jassi Brar
2014-11-10 12:57 ` Ashwin Chaugule
2014-11-10 13:39 ` Jassi Brar
2014-11-10 13:53 ` Ashwin Chaugule [this message]
2014-11-10 14:16 ` Jassi Brar
2014-11-10 14:47 ` Ashwin Chaugule
2014-11-10 17:44 ` Jassi Brar
2014-11-10 20:13 ` Mark Brown
2014-11-10 20:29 ` [Linaro-acpi] " Arnd Bergmann
2014-11-11 4:31 ` Jassi Brar
2014-11-11 4:04 ` Jassi Brar
2014-11-11 13:02 ` Ashwin Chaugule
2014-11-11 13:57 ` Jassi Brar
2014-11-11 16:33 ` [Linaro-acpi] " Arnd Bergmann
2014-11-11 17:39 ` Jassi Brar
2014-11-11 17:54 ` Arnd Bergmann
2014-11-11 19:08 ` Jassi Brar
2014-11-11 19:22 ` Ashwin Chaugule
2014-11-11 20:38 ` Arnd Bergmann
2014-11-11 17:53 ` Mark Brown
2014-11-11 10:30 ` Sudeep Holla
2014-11-11 13:18 ` Ashwin Chaugule
2014-11-11 15:01 ` Sudeep Holla
2014-11-11 20:25 ` Arnd Bergmann
2014-11-12 13:32 ` Sudeep Holla
2014-11-12 13:48 ` Ashwin Chaugule
2014-11-12 14:03 ` Sudeep Holla
2014-11-12 18:25 ` [Linaro-acpi] " Ashwin Chaugule
2014-11-12 18:26 ` Mark Brown
2014-11-12 19:04 ` Jassi Brar
2014-11-12 19:16 ` Ashwin Chaugule
2014-11-11 17:29 ` Mark Brown
2014-11-11 18:07 ` Sudeep Holla
2014-11-11 15:12 ` Jassi Brar
2014-11-11 15:19 ` Ashwin Chaugule
2014-11-11 15:25 ` Jassi Brar
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=CAJ5Y-eZa4zukM4ai3n7Ei86PLaaCoF_w4PqFzAdrojg_rOGdig@mail.gmail.com \
--to=ashwin.chaugule@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=jaswinder.singh@linaro.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=patches@linaro.org \
--cc=rjw@rjwysocki.net \
/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).