From: Sudeep Holla <sudeep.holla@arm.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Sudeep Holla <Sudeep.Holla@arm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Liviu Dudau <Liviu.Dudau@arm.com>,
Punit Agrawal <Punit.Agrawal@arm.com>,
"Jon Medhurst (Tixy)" <tixy@linaro.org>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
Kevin Hilman <khilman@kernel.org>
Subject: Re: [PATCH v5 2/8] firmware: add support for ARM System Control and Power Interface(SCPI) protocol
Date: Fri, 31 Jul 2015 14:08:43 +0100 [thread overview]
Message-ID: <55BB735B.7010501@arm.com> (raw)
In-Reply-To: <55BB5138.2010004@arm.com>
On 31/07/15 11:43, Sudeep Holla wrote:
>
>
> On 31/07/15 11:38, Jassi Brar wrote:
>> On Fri, Jul 31, 2015 at 3:10 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>>
>>> I forgot to mention, we have a the following description in
>>> mbox_client_txdone which is misleading:
>>>
>>> "The client/protocol had received some 'ACK' packet and it notifies the
>>> API that the last packet was sent successfully. This only works if the
>>> controller can't sense TX-Done."
>>>
>>> which is clearly not the case in SCPI. IMO we may have to reword that.
>>>
>> Yes. And also see whether it could race with polling driven tx_tick.
>>
>
> Yes I am also looking at that now while I am trying to check if
> TXDONE_BY_ACK works on Juno, will keep you posted.
>
OK, I recollect the racy condition now which I had in my mind from the
beginning convincing myself why we can't use that option. I was not good
in words to explain it so far but let me try with the ASCII art this
time. Note Tx ACK below means the remote setting the register flag and
not to be confused with the ACK packet. For simplicity Rx can be assumed
to be Tx ACK packet
Time MHU/SCPI Remote SCP
| |
1 |------------ Tx1 -------------->|
| |
2 |<----------- Tx1 ACK -----------|
| |
3 |------------ Tx2 -------------->|
| |
4 |<----------- Rx1 ---------------|
| |
5 |<----------- Tx2 ACK -----------|
| |
6 |------------ Tx3 -------------->|
| |
7 |<----------- Rx2 ---------------|
Now lets consider the above scenario, suppose we have TXDONE_BY_ACK
and use mbox_client_txdone in Rx interrupt(i.e. response packet), we end
up in the race easily IIUC.
E.g. A client would have sent Tx2(3) before Rx1 interrupt(4) and if we
ACK Tx1 now in (3), we will end up acknowledging Tx2(5) as the mailbox
core assumes only one Tx request at a time which is clearly not the case
in our setup. The client can then go ahead and send Tx3(6) overwriting
the payload while remote was processing or even result in remote missing
the request completely. Does that make sense or am I missing something ?
Regards,
Sudeep
next prev parent reply other threads:[~2015-07-31 13:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 11:10 [PATCH v5 0/8] ARM64: juno: add SCPI mailbox protocol, clock and CPUFreq support Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 1/8] Documentation: add DT binding for ARM System Control and Power Interface(SCPI) protocol Sudeep Holla
2015-07-28 10:22 ` Sudeep Holla
2015-07-31 16:00 ` Mark Rutland
2015-07-31 16:07 ` Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 2/8] firmware: add support " Sudeep Holla
2015-07-29 8:05 ` Jassi Brar
2015-07-29 8:38 ` Sudeep Holla
2015-07-29 11:19 ` Jassi Brar
2015-07-29 12:50 ` Sudeep Holla
2015-07-30 17:56 ` Jassi Brar
2015-07-31 9:21 ` Sudeep Holla
2015-07-31 9:40 ` Sudeep Holla
2015-07-31 10:38 ` Jassi Brar
2015-07-31 10:43 ` Sudeep Holla
2015-07-31 13:08 ` Sudeep Holla [this message]
2015-07-31 13:45 ` Jassi Brar
2015-08-05 10:57 ` Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 3/8] clk: add support for clocks provided by SCP(System Control Processor) Sudeep Holla
2015-07-28 10:21 ` Sudeep Holla
2015-07-29 17:37 ` Stephen Boyd
2015-07-30 9:12 ` Sudeep Holla
2015-07-31 6:26 ` Stephen Boyd
2015-07-23 11:10 ` [PATCH v5 4/8] clk: scpi: add support for cpufreq virtual device Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 5/8] cpufreq: arm_big_little: add SCPI interface driver Sudeep Holla
2015-07-28 10:20 ` Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 6/8] arm64: dts: add SRAM, MHU mailbox and SCPI support on Juno Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 7/8] arm64: dts: add CPU topology " Sudeep Holla
2015-07-23 11:10 ` [PATCH v5 8/8] arm64: dts: add clock support for all the cpus Sudeep Holla
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=55BB735B.7010501@arm.com \
--to=sudeep.holla@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=Lorenzo.Pieralisi@arm.com \
--cc=Punit.Agrawal@arm.com \
--cc=arnd@arndb.de \
--cc=jassisinghbrar@gmail.com \
--cc=khilman@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tixy@linaro.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).