From: Fabien DESSENNE <fabien.dessenne@st.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre TORGUE <alexandre.torgue@st.com>,
Ludovic BARRE <ludovic.barre@st.com>,
"Devicetree List" <devicetree@vger.kernel.org>, "\",
linux-arm-kernel\"@lists.infradead.org" <",
linux-arm-kernel"@lists.infradead.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
srv_heupstream <linux-arm-kernel@lists.infradead.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Loic PALLARDY <loic.pallardy@st.com>,
"Arnaud POULIQUEN" <arnaud.pouliquen@st.com>
Subject: Re: [PATCH v2 2/2] mailbox: add STMicroelectronics STM32 IPCC driver
Date: Fri, 6 Apr 2018 12:29:02 +0000 [thread overview]
Message-ID: <4a2170b7-e5e9-4f5c-8ff7-79e102a658c1@st.com> (raw)
In-Reply-To: <CABb+yY1x7J_oEgU-LR5jPYCoCoUHng84E+CibTxLzdtxhENTBw@mail.gmail.com>
Hi
On 05/04/18 11:38, Jassi Brar wrote:
> On Mon, Mar 12, 2018 at 4:28 PM, Fabien Dessenne <fabien.dessenne@st.com> wrote:
> ....
>> +
>> + /* irq */
>> + for (i = 0; i < IPCC_IRQ_NUM; i++) {
>> + ipcc->irqs[i] = of_irq_get_byname(dev->of_node, irq_name[i]);
>> + if (ipcc->irqs[i] < 0) {
>> + dev_err(dev, "no IRQ specified %s\n", irq_name[i]);
>> + ret = ipcc->irqs[i];
>> + goto err_clk;
>> + }
>> +
>> + ret = devm_request_threaded_irq(dev, ipcc->irqs[i], NULL,
>> + irq_thread[i], IRQF_ONESHOT,
>> + dev_name(dev), ipcc);
>>
> In your interrupt handlers you don't do anything that could block.
> Threads only adds some delay to your message handling.
> So maybe use devm_request_irq() ?
The interrupt handlers call mbox_chan_received_data() /
mbox_chan_txdone(), which call in turn client's rx_callback() /
tx_done() / tx_prepare() which behavior may be unsafe. Hence, using a
threaded irq here seems to be a good choice.
>
> .......
>> +
>> +static struct platform_driver stm32_ipcc_driver = {
>> + .driver = {
>> + .name = "stm32-ipcc",
>> + .owner = THIS_MODULE,
>>
> No need of owner here these days.
OK, I will suppress it.
> And also maybe use readl/writel, instead of _relaxed.
The IPCC device is exclusively used on ARM. In ARM architecture, the
ioremap on devices are strictly ordered and uncached.
In that case, using _relaxed avoids an unneeded cache flush, slightly
improving performance.
>
> Cheers!
next prev parent reply other threads:[~2018-04-06 12:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 10:58 [PATCH v2 0/2] mailbox: introduce " Fabien Dessenne
2018-03-12 10:58 ` [PATCH v2 1/2] dt-bindings: mailbox: add STMicroelectronics STM32 IPCC binding Fabien Dessenne
2018-03-18 12:48 ` Rob Herring
2018-03-12 10:58 ` [PATCH v2 2/2] mailbox: add STMicroelectronics STM32 IPCC driver Fabien Dessenne
2018-04-03 9:53 ` [v2,2/2] " Fabien DESSENNE
2018-04-05 9:38 ` [PATCH v2 2/2] " Jassi Brar
2018-04-06 12:29 ` Fabien DESSENNE [this message]
2018-04-06 12:56 ` Jassi Brar
2018-04-06 15:05 ` Fabien DESSENNE
2018-04-06 16:20 ` Jassi Brar
2018-04-09 9:03 ` Fabien DESSENNE
2018-04-09 10:10 ` 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=4a2170b7-e5e9-4f5c-8ff7-79e102a658c1@st.com \
--to=fabien.dessenne@st.com \
--cc=", linux-arm-kernel"@lists.infradead.org \
--cc=alexandre.torgue@st.com \
--cc=arnaud.pouliquen@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=loic.pallardy@st.com \
--cc=ludovic.barre@st.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--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
all inboxes | Powered by JetHome®