]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
remoteproc: pru: Fix wrong success return value for fw events
authorSuman Anna <s-anna@ti.com>
Wed, 7 Apr 2021 15:56:40 +0000 (10:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:40 +0000 (10:29 +0200)
commit2c83114da3e04befded9395e12527518e62da704
treebb8f75a2ba7b4452537aa79b5d958231846e9a6e
parent01bb83e7fa92f97073f24808f300a286ba89728a
remoteproc: pru: Fix wrong success return value for fw events

[ Upstream commit 1fe72bcfac087dba5ab52778e0646ed9e145cd32 ]

The irq_create_fwspec_mapping() returns a proper virq value on success
and 0 upon any failure. The pru_handle_intrmap() treats this as an error
and disposes all firmware event mappings correctly, but is returning
this incorrect value as is, letting the pru_rproc_start() interpret it
as a success and boot the PRU.

Fix this by returning an error value back upon any such failure. While
at this, revise the error trace to print some meaningful info about the
failed event.

Fixes: c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration")
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210407155641.5501-3-s-anna@ti.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/pru_rproc.c