From nobody Wed Dec 17 15:41:03 2025 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCBA51CCEC8; Tue, 13 May 2025 05:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747115130; cv=none; b=AQpRADezYWWOFo2NeGy7tQGOQLLeojInXDr4TjTLAuL9ieDW9IHTr2Lh5PrC+HpH/ELf50HCXzgBLQ7kijdqn5pc9NlFDt5oIsRnBrhn/tTWi+JyZ2FSboM6r8p48szvzF9zBzgFSFUh16cesQ79fQ8LTD7HZSfYvgbjznBSZEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747115130; c=relaxed/simple; bh=o6n2b2prLNRMQqo9/TPYa0xx8mLRSli7szH2/GCn/XE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gz6PTsW18HCo0k/ZMYFcbMV2vDgSLEKeELt3MiKx3ccijlixDajNhPTreMJbuuwdVSD3NMvD0yaaycQJaPN2i8CWwwYU3CPsJW93rxaE230DCYlJ2bXnHylLabGhOppLaN07TFqgD8cDERn9YtbIPRy5bupZXLfsiaAQFdbKsOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=hmto8NHr; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hmto8NHr" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 54D5jJCs2985462 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 May 2025 00:45:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1747115120; bh=Ow7cyDCw386R9q24/E8HuXKhKtnAWR8U7phtcMGmNFg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hmto8NHrrlSy1tz0RZ6HPjkOzcrfirC2PXrSxWYYIBti3QGxk0T3IjsMI47qZGBCK IAcTGBx5kpSEqybY7t7wIi332H3ZTPE1KYyCDdqCPJZBOh+3tb378lP0jRcz6DcLmV hYm54cq48dCqeA7YMlXbBH71n5+TwceDmeJOYBxM= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 54D5jJbR032023 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 May 2025 00:45:19 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 13 May 2025 00:45:19 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 13 May 2025 00:45:19 -0500 Received: from uda0510294.dhcp.ti.com (uda0510294.dhcp.ti.com [172.24.227.151]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 54D5jAqA131001; Tue, 13 May 2025 00:45:15 -0500 From: Beleswar Padhi To: , CC: , , , , , , , , , , Subject: [PATCH v12 01/36] remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick} Date: Tue, 13 May 2025 11:14:35 +0530 Message-ID: <20250513054510.3439842-2-b-padhi@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250513054510.3439842-1-b-padhi@ti.com> References: <20250513054510.3439842-1-b-padhi@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" From: Siddharth Vadapalli Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is responsible for attaching to a remote core, updates the state of the remote core to "RPROC_ATTACHED" only after invoking "rproc_start_subdevices()". The "rproc_start_subdevices()" function triggers the probe of the Virtio RPMsg devices associated with the remote core, which require that the "k3_r5_rproc_kick()" and "k3_r5_rproc_mbox_callback()" callbacks are functional. Hence, drop the check in the callbacks. Fixes: f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during prob= e routine") Signed-off-by: Siddharth Vadapalli Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-2-b-padhi@ti.com/ v11: Changelog: 1. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-2-b-padhi@ti.com/ v10: Changelog: 1. Re-ordered this patch to come at the start of the series. Link to v9: https://lore.kernel.org/all/20250317120622.1746415-7-b-padhi@ti.com/ drivers/remoteproc/ti_k3_r5_remoteproc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/= ti_k3_r5_remoteproc.c index dbc513c5569cb..3fc0b97dec600 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -194,10 +194,6 @@ static void k3_r5_rproc_mbox_callback(struct mbox_clie= nt *client, void *data) const char *name =3D kproc->rproc->name; u32 msg =3D omap_mbox_message(data); =20 - /* Do not forward message from a detached core */ - if (kproc->rproc->state =3D=3D RPROC_DETACHED) - return; - dev_dbg(dev, "mbox msg: 0x%x\n", msg); =20 switch (msg) { @@ -233,10 +229,6 @@ static void k3_r5_rproc_kick(struct rproc *rproc, int = vqid) mbox_msg_t msg =3D (mbox_msg_t)vqid; int ret; =20 - /* Do not forward message to a detached core */ - if (kproc->rproc->state =3D=3D RPROC_DETACHED) - return; - /* send the index of the triggered virtqueue in the mailbox payload */ ret =3D mbox_send_message(kproc->mbox, (void *)msg); if (ret < 0) --=20 2.34.1