linux-stable/drivers/mailbox
Sudeep Holla e36f4a7c88 mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone
commit 33cd7123ac upstream

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>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-12 19:18:23 +01:00
..
arm_mhu.c
bcm-flexrm-mailbox.c mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush timeout issue 2019-03-23 14:35:15 +01:00
bcm-pdc-mailbox.c mailbox: bcm-pdc: Add Northstar Plus support to PDC driver 2017-03-28 23:27:56 +05:30
bcm2835-mailbox.c
hi6220-mailbox.c
Kconfig mailbox: Introduce Qualcomm APCS IPC driver 2017-06-14 17:47:19 +05:30
mailbox-altera.c
mailbox-sti.c
mailbox-test.c mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready 2017-12-14 09:53:12 +01:00
mailbox-xgene-slimpro.c mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 19:55:54 +02:00
mailbox.c mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone 2019-11-12 19:18:23 +01:00
mailbox.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-mailbox.c
pcc.c mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone 2019-11-12 19:18:23 +01:00
pl320-ipc.c
platform_mhu.c
qcom-apcs-ipc-mailbox.c mailbox: Introduce Qualcomm APCS IPC driver 2017-06-14 17:47:19 +05:30
rockchip-mailbox.c
tegra-hsp.c
ti-msgmgr.c