From patchwork Mon Mar 25 16:58:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 13602518 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 5164913AD0D; Mon, 25 Mar 2024 16:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; cv=none; b=lBSqvDt7FmZ/MpCX8CFYI/2cYNHX5aYKCfCDigLhqnNROc6s1YNTxBr6FRGlwm5GxFBXOK4LHaYD5fQASb3OHpSzAPFG0ZOla38PCFNsQM51ujxW0ph0/iTR+XuuoNmM340MOir+vxesarUKmPVabVToVmMYyvBTEpNEuoCGNsI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; c=relaxed/simple; bh=sgsGIdh6rXa+N6eNCVGxGbFVkGZfZjwxfq7Srb4nJuA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=AQUWHaEjZ5P1vSFhpOGoLnIftDgXaE2uqJaJCmd2cG6bfbsv8kFEAGc3hcaxr2lh6waYI4sJNW6cq/vYIIBg5Zm/SW5mTGjWI9hrLcocCYo8se8efN1S5iHhlR/WyqcvdFRquDSIEQQDvvxJRkrgt6Q2CUkYuzDlhQaZCXLWOrg= 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=mZJZ30FR; arc=none smtp.client-ip=198.47.23.249 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="mZJZ30FR" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42PGw9k2006240; Mon, 25 Mar 2024 11:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711385889; bh=TuY6VETr0CDU+pGqpyrVp2v9Y506MoJZo3FRapPogA8=; h=From:To:CC:Subject:Date; b=mZJZ30FRQBCfqA93Ncw6s/CjBL1M6wyurmmmB58wnnGZb0whWlwBduVHk/ONUWyUE OiofznNqcNgjLAimFYroi7g0p7R9VHtSyn/ruBYzqs5WHmALJKgGoB8dG9GyyUFLCd NSxm8rUO89v0QnO3WhF6/YJ0CTwEhwLPITLNl9bU= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42PGw9SY079557 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2024 11:58:09 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 25 Mar 2024 11:58:09 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE107.ent.ti.com (10.64.6.28) 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; Mon, 25 Mar 2024 11:58:08 -0500 Received: from lelvsmtp6.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42PGw83i029739; Mon, 25 Mar 2024 11:58:08 -0500 From: Andrew Davis To: Bjorn Andersson , Mathieu Poirier CC: , , Andrew Davis Subject: [PATCH 1/3] remoteproc: k3-dsp: Fix usage of omap_mbox_message and mbox_msg_t Date: Mon, 25 Mar 2024 11:58:06 -0500 Message-ID: <20240325165808.31885-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). Use u32 unconditionally and remove the now unneeded omap-mailbox.h include. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 3555b535b1683..33b30cfb86c9d 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -113,7 +112,7 @@ static void k3_dsp_rproc_mbox_callback(struct mbox_client *client, void *data) client); struct device *dev = kproc->rproc->dev.parent; const char *name = kproc->rproc->name; - u32 msg = omap_mbox_message(data); + u32 msg = (u32)(uintptr_t)(data); dev_dbg(dev, "mbox msg: 0x%x\n", msg); @@ -152,11 +151,11 @@ static void k3_dsp_rproc_kick(struct rproc *rproc, int vqid) { struct k3_dsp_rproc *kproc = rproc->priv; struct device *dev = rproc->dev.parent; - mbox_msg_t msg = (mbox_msg_t)vqid; + u32 msg = vqid; int ret; /* send the index of the triggered virtqueue in the mailbox payload */ - ret = mbox_send_message(kproc->mbox, (void *)msg); + ret = mbox_send_message(kproc->mbox, (void *)(uintptr_t)msg); if (ret < 0) dev_err(dev, "failed to send mailbox message (%pe)\n", ERR_PTR(ret)); From patchwork Mon Mar 25 16:58:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 13602520 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 A83851B962; Mon, 25 Mar 2024 16:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; cv=none; b=spPbw5HMdgkuBLWcuII/D4MIoiWoB6YLmypaVohJbTbbXzVPYyYh5jB+qJlVJJgB3CFHDwnYMigousZyh0LIbJDFBqdMSuWf4MGyAXCDD1ia5epx10+YShMNSs9nejlw8aU0eWMF+g+ogS2XFOY83hNDCLFgNKVN+WjMANVbkOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; c=relaxed/simple; bh=rqO3U+kmuB+SaZ67iLGqmxUpEUQEILsZ2JW/jQDB/nM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p9aKQe/fOCGFCIID1iSiLyQLXax5Nn1/h6rqvIBhdbb2IHSr1LdDcr51MhBLMRKBLAAl4tS2NG1a8IlTkTCfuoblbBwG/VtIE+OkB5lRQ0rE8JpypC21QeMNI81DDEsSftAZeVcJB3zuHScj3lKMaUO4R7N5/9MmuXqBbIXnMNw= 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=BbhyOwxL; arc=none smtp.client-ip=198.47.23.248 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="BbhyOwxL" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42PGw97q056599; Mon, 25 Mar 2024 11:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711385889; bh=EA0GkImO3YEnQ6eaQ8paCB06eEmWI7nX63pij7AZSqc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BbhyOwxLdsjaumodUnAXf6/sceTnj9JbcC/0AYi/Cgsfy50lBuZ66fzw2R0ybq/pc m9fnCnyCd+BZxorcAEbrRVhxdAO/Q9HAjQ2125/t4yB8QlpIXXb1OGZxGfM5OLiZaK bQSK1s4232405WCmxc4MidSLcnhQCqKH+6fSkdPs= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42PGw9kq013858 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2024 11:58:09 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 25 Mar 2024 11:58:09 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE110.ent.ti.com (157.170.170.21) 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; Mon, 25 Mar 2024 11:58:09 -0500 Received: from lelvsmtp6.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42PGw83j029739; Mon, 25 Mar 2024 11:58:09 -0500 From: Andrew Davis To: Bjorn Andersson , Mathieu Poirier CC: , , Andrew Davis Subject: [PATCH 2/3] remoteproc: k3-r5: Fix usage of omap_mbox_message and mbox_msg_t Date: Mon, 25 Mar 2024 11:58:07 -0500 Message-ID: <20240325165808.31885-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240325165808.31885-1-afd@ti.com> References: <20240325165808.31885-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The type of message sent using omap-mailbox is always u32. The definition of mbox_msg_t is uintptr_t which is wrong as that type changes based on the architecture (32bit vs 64bit). Use u32 unconditionally and remove the now unneeded omap-mailbox.h include. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_r5_remoteproc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index ad3415a3851b2..3bcde6d00b56a 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -188,7 +187,7 @@ static void k3_r5_rproc_mbox_callback(struct mbox_client *client, void *data) client); struct device *dev = kproc->rproc->dev.parent; const char *name = kproc->rproc->name; - u32 msg = omap_mbox_message(data); + u32 msg = (u32)(uintptr_t)(data); dev_dbg(dev, "mbox msg: 0x%x\n", msg); @@ -222,11 +221,11 @@ static void k3_r5_rproc_kick(struct rproc *rproc, int vqid) { struct k3_r5_rproc *kproc = rproc->priv; struct device *dev = rproc->dev.parent; - mbox_msg_t msg = (mbox_msg_t)vqid; + u32 msg = vqid; int ret; /* send the index of the triggered virtqueue in the mailbox payload */ - ret = mbox_send_message(kproc->mbox, (void *)msg); + ret = mbox_send_message(kproc->mbox, (void *)(uintptr_t)msg); if (ret < 0) dev_err(dev, "failed to send mailbox message, status = %d\n", ret); From patchwork Mon Mar 25 16:58:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 13602519 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 A83CF1BF3B; Mon, 25 Mar 2024 16:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; cv=none; b=Gspm6XT7vW/WfAsaAnL+uliR1Jq5SkurU+xlZoljmKlZ2BP+LlmWA31m+h7v31HgCLKycFUPBSo9PWjv5vxWXIV3UHY2j8e456kNguQYzRIXQwythW1+U4mJfyf0X9tlEXU8+qdDdbDLaQC0UtTwZFWvWnYmGQgeXxaymUHaRhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385895; c=relaxed/simple; bh=s+1XxCgD/bIw+EVjquCNoElOO+KgUsBhWbtYu72Cc7Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=td3Ka9EvjWoXL5EYZJAeMQR5u3qC6fZDSJFtDdQz4aF45ufrHNAF4a+uRFR8FwB9FBPkk8h1c9rNtCC17YNG0FznYmuFAq9E4FlZjnvLCC+Dvx41c2EuqRdQDyzmFpbvVnA3SWkQSp279AEB7kAl3LkwqSvua/Ie3uLVVo+CUB4= 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=Pc+Zz6Nu; arc=none smtp.client-ip=198.47.23.248 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="Pc+Zz6Nu" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42PGwAqo056603; Mon, 25 Mar 2024 11:58:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711385890; bh=GPiMIB+Jdz5Fonm+uVYUxOBrjgYl4eFPyll8eytBOg8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Pc+Zz6NuyRvUkU6vVtP3kjd9dycVyrX3/mRnCzDFrdNBoK0pB3vy386vArHGk50yf xn/SE6j+2b3HhgEkzKrq5D7rmU+RePfyFcnSgMIvGFcvOEZLHgZmBb2Y9SRqQeAu5n I6GcKZRNWvoPiXs7LU70lDzqocZQJX1F4+JCvSRQ= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42PGwASK079561 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2024 11:58:10 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) 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; Mon, 25 Mar 2024 11:58:09 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE106.ent.ti.com (10.64.6.27) 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; Mon, 25 Mar 2024 11:58:09 -0500 Received: from lelvsmtp6.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42PGw83k029739; Mon, 25 Mar 2024 11:58:09 -0500 From: Andrew Davis To: Bjorn Andersson , Mathieu Poirier CC: , , Andrew Davis Subject: [PATCH 3/3] remoteproc: omap: Remove unused header omap-mailbox.h Date: Mon, 25 Mar 2024 11:58:08 -0500 Message-ID: <20240325165808.31885-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240325165808.31885-1-afd@ti.com> References: <20240325165808.31885-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 This header no longer used, remove this include. Signed-off-by: Andrew Davis --- drivers/remoteproc/omap_remoteproc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 8f50ab80e56f4..bde04e3e6d966 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include