From: Suman Anna <s-anna@ti.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Clement Leger <cleger@kalray.eu>,
Loic Pallardy <loic.pallardy@st.com>,
Arnaud Pouliquen <arnaud.pouliquen@st.com>,
Lokesh Vutla <lokeshvutla@ti.com>,
<linux-remoteproc@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] remoteproc: introduce version element into resource type field
Date: Thu, 21 May 2020 14:52:02 -0500 [thread overview]
Message-ID: <5529e8ff-b5ed-9dd6-e7f6-55a00225c2b9@ti.com> (raw)
In-Reply-To: <20200521194116.GP408178@builder.lan>
On 5/21/20 2:41 PM, Bjorn Andersson wrote:
> On Thu 21 May 12:29 PDT 2020, Suman Anna wrote:
>
>> On 5/21/20 2:21 PM, Bjorn Andersson wrote:
>>> On Thu 21 May 12:06 PDT 2020, Suman Anna wrote:
>>>
>>>> Hi Bjorn,
>>>>
>>>> On 5/21/20 12:54 PM, Bjorn Andersson wrote:
>>>>> On Wed 25 Mar 13:46 PDT 2020, Suman Anna wrote:
>>>>>
>>>>>> The current remoteproc core has supported only 32-bit remote
>>>>>> processors and as such some of the current resource structures
>>>>>> may not scale well for 64-bit remote processors, and would
>>>>>> require new versions of resource types. Each resource is currently
>>>>>> identified by a 32-bit type field. Introduce the concept of version
>>>>>> for these resource types by overloading this 32-bit type field
>>>>>> into two 16-bit version and type fields with the existing resources
>>>>>> behaving as version 0 thereby providing backward compatibility.
>>>>>>
>>>>>> The version field is passed as an additional argument to each of
>>>>>> the handler functions, and all the existing handlers are updated
>>>>>> accordingly. Each specific handler will be updated on a need basis
>>>>>> when a new version of the resource type is added.
>>>>>>
>>>>>
>>>>> I really would prefer that we add additional types for the new
>>>>> structures, neither side will be compatible with new versions without
>>>>> enhancements to their respective implementations anyways.
>>>>
>>>> OK.
>>>>
>>>>>
>>>>>> An alternate way would be to introduce the new types as completely
>>>>>> new resource types which would require additional customization of
>>>>>> the resource handlers based on the 32-bit or 64-bit mode of a remote
>>>>>> processor, and introduction of an additional mode flag to the rproc
>>>>>> structure.
>>>>>>
>>>>>
>>>>> What would this "mode" indicate? If it's version 0 or 1?
>>>>
>>>> No, for indicating if the remoteproc is 32-bit or 64-bit and adjust the
>>>> loading handlers if the resource types need to be segregated accordingly.
>>>>
>>>
>>> Sorry, I think I'm misunderstanding something. Wouldn't your 64-bit
>>> remote processor need different firmware from your 32-bit processor
>>> anyways, if you want to support the wider resource? And you would pack
>>> your firmware with the appropriate resource types?
>>
>> Yes, that's correct.
>>
>>>
>>> Afaict the bit width of your remote processor, busses or memory is
>>> unrelated to the choice of number of bits used to express things in the
>>> resource table.
>>
>> I would have to add the new resource type to the loading_handlers right, so
>> it is a question of whether we want to impose any restrictions in remoteproc
>> core or not from supporting a certain resource type (eg: I don't expect
>> RSC_TRACE entries on 64-bit processors).
>>
>
> Right, but either you add support for new resource types to the
> loading_handlers, or you add the version checks within each handler,
> either way you will have to do some work to be compatible with new
> versions.
>
> Regarding what resources would be fit for a 64-bit processor probably
> relates to many things, in particular the question of what we actually
> mean when we say that a coprocessor is 64-bit. So I don't really see a
> need for the remoteproc core to prevent someone to design their
> system/firmware to have a 64-bit CPU being passed 32-bit addresses.
OK. In general, I have seen firmware developers get confused w.r.t the
resource types, that's why I was inclined to go with the restrictive
checking. Anyway, will rework the support as per the comments.
regards
Suman
next prev parent reply other threads:[~2020-05-21 19:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 20:46 [PATCH 0/4] Update K3 DSP remoteproc driver for C71x DSPs Suman Anna
2020-03-25 20:46 ` [PATCH 1/4] dt-bindings: remoteproc: k3-dsp: Update bindings " Suman Anna
2020-03-31 21:56 ` Rob Herring
2020-03-25 20:46 ` [PATCH 2/4] remoteproc: introduce version element into resource type field Suman Anna
2020-05-21 17:54 ` Bjorn Andersson
2020-05-21 19:06 ` Suman Anna
2020-05-21 19:21 ` Bjorn Andersson
2020-05-21 19:29 ` Suman Anna
2020-05-21 19:41 ` Bjorn Andersson
2020-05-21 19:52 ` Suman Anna [this message]
2020-03-25 20:47 ` [PATCH 3/4] remoteproc: add support for a new 64-bit trace version Suman Anna
2020-05-21 18:04 ` Bjorn Andersson
2020-05-21 19:42 ` Suman Anna
2020-05-22 16:54 ` Suman Anna
2020-05-22 17:33 ` Bjorn Andersson
2020-05-22 18:03 ` Clément Leger
2020-05-22 18:10 ` Clément Leger
2020-05-22 18:59 ` Suman Anna
2020-05-22 19:28 ` Clément Leger
2020-03-25 20:47 ` [PATCH 4/4] remoteproc/k3-dsp: Add support for C71x DSPs Suman Anna
2020-04-27 19:54 ` Suman Anna
2020-05-21 15:57 ` [PATCH 0/4] Update K3 DSP remoteproc driver " Suman Anna
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=5529e8ff-b5ed-9dd6-e7f6-55a00225c2b9@ti.com \
--to=s-anna@ti.com \
--cc=arnaud.pouliquen@st.com \
--cc=bjorn.andersson@linaro.org \
--cc=cleger@kalray.eu \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=lokeshvutla@ti.com \
--cc=mathieu.poirier@linaro.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).