Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679334
| Path | csiph.com!goblin3!goblin1!goblin.stu.neva.ru!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jassi Brar <jassisinghbrar@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone |
| Date | Sat, 01 Jul 2017 13:30:02 +0200 |
| Message-ID | <tYoL8-2ta-3@gated-at.bofh.it> (permalink) |
| References | <tY5S9-77y-9@gated-at.bofh.it> |
| X-Original-To | Sudeep Holla <sudeep.holla@arm.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fl3I24qsUA14ldWG2rH95YEmYreHTUtPn7oecsS2keI=; b=oO2tgyvxrcGlDs/jK4ayXEYvQaw7WWrI/NGypmmo1+Qo9LUVo6qp82y+PgskZ7mkTN UuxVK1idFiGV8ZfcO4j2ALV3ad7q0KMtxU4T3Am6q/uQ8h+6HTJ/F93u/EKVHi8UZlWt h75Y8Vo8oCSG8O582Nl1N3kv0Y5IAbNq9vn3SDlwnw3OMYK83wLxYd/0KySfJHCu0SYj /ZARaV5fJEHXatzt2pZRk+LDlzXYDaivTUEaWVOqv5fjwgBRsTnYh6JaZfHabYk1JxoC haQYrE/xBdw6CRi8fGvzzsPw4uPbYnK8GorV+Mgbey8IV3npRiMvqVaGn9nIS70bSIQ/ DyZw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fl3I24qsUA14ldWG2rH95YEmYreHTUtPn7oecsS2keI=; b=C6if+fc/zN9GPJs0qLQbq85VhCIZ/Lx9TWyLZO7REil8obkYlNRe5vwRZtbXLkvWqp XKiB93XQxsEIB1fD2bDEqCYZWp/UL4l16ODc0o0ODTMBS9dqr6ML7sm4hYwMsR+AUCcd wyBJ4jY1oHdMLpLixnGs2Kk1Poj2cMqKLlNcmS9gMuk9u58nzSnyyD3E6fAesibL1VWq LcRFHlx8sXL+jlZ778mEAtXfBmSpM/wncGI5018kOhf55B4fT0OEH3ceCmW7a49GtWx6 7X3Y3PMGVR7QLKUUB9uPNZKmldd67NFaLJxr825EJDWFDwp/QMOLuTeXLEdoMbAHJqmO 7WLw== |
| X-Gm-Message-State | AKS2vOyGUUkOkXwm/8/nQiW4ObIro8xAXPYWhGPAiuZysFl4wvLYZcZV YDP51oGRAWHqD9QR/efoX7+tpTH4CBsV |
| X-Received | by 10.80.169.193 with SMTP id n59mr8373279edc.181.1498908305465; Sat, 01 Jul 2017 04:25:05 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | LKML <linux-kernel@vger.kernel.org>, Alexey Klimov <alexey.klimov@arm.com>, Jassi Brar <jaswinder.singh@linaro.org> |
| X-Original-Date | Sat, 1 Jul 2017 16:55:04 +0530 |
| X-Original-Message-ID | <CABb+yY304w2TC8GBAKfuVoRMzQoyf1qikDsd_13NFw+R-X+cpg@mail.gmail.com> |
| X-Original-References | <1498835681-23975-1-git-send-email-sudeep.holla@arm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1679334 |
Show key headers only | View raw
On Fri, Jun 30, 2017 at 8:44 PM, Sudeep Holla <sudeep.holla@arm.com> wrote: > Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if > the controller sets txdone_by_poll. However some clients can have a > mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone. > However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that > case. In such scenario, we may end up with below warnings as the tx > ticker is run both by mailbox framework and the client. > > WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8 > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 #242 > Hardware name: ARM LTD ARM Juno Development Platform > task: ffff8009768ca700 task.stack: ffff8009768f8000 > PC is at hrtimer_forward+0x88/0xd8 > LR is at txdone_hrtimer+0xd4/0xf8 > Call trace: > hrtimer_forward+0x88/0xd8 > __hrtimer_run_queues+0xe4/0x158 > hrtimer_interrupt+0xa4/0x220 > arch_timer_handler_phys+0x30/0x40 > handle_percpu_devid_irq+0x78/0x130 > generic_handle_irq+0x24/0x38 > __handle_domain_irq+0x5c/0xb8 > gic_handle_irq+0x54/0xa8 > > This patch fixes the issue by resetting TXDONE_BY_POLL if client has set > knows_txdone. > > Cc: Alexey Klimov <alexey.klimov@arm.com> > Cc: Jassi Brar <jaswinder.singh@linaro.org> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> > --- > drivers/mailbox/mailbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c > index 537f4f6d009b..8da30f833262 100644 > --- a/drivers/mailbox/mailbox.c > +++ b/drivers/mailbox/mailbox.c > @@ -351,7 +351,7 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index) > init_completion(&chan->tx_complete); > > if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone) > - chan->txdone_method |= TXDONE_BY_ACK; > + chan->txdone_method = TXDONE_BY_ACK; > It has to be restored back in mbox_free_channel() thanks
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Sudeep Holla <sudeep.holla@arm.com> - 2017-06-30 17:20 +0200
Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Jassi Brar <jassisinghbrar@gmail.com> - 2017-07-01 13:30 +0200
Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Sudeep Holla <sudeep.holla@arm.com> - 2017-07-03 11:00 +0200
Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Sudeep Holla <sudeep.holla@arm.com> - 2017-07-03 11:40 +0200
Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Jassi Brar <jaswinder.singh@linaro.org> - 2017-07-03 14:00 +0200
Re: [PATCH 1/2] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Sudeep Holla <sudeep.holla@arm.com> - 2017-07-03 15:00 +0200
csiph-web