Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382950; b=OIObxDRUvnyy/Ba2+T7oiX0QqBVhSQVoyI1s9YS+5RLEaAnhYRcpRkRTD2JUl0eTPF2u zqep6SKF4CwC2IWbpIQ/4Wy9v3GEDBIKOMotVAlmeaBqU/ys2bwJ65bjQOt7Xs2DcEkz3 kDauuU4I7CNO05p19efr6UFVqkQ3o6ShhFa09lV4JJge06uFlQZGGXkD1nOij+v8OUJ1E N8DRIslgc5NHmJkVEeK/phEEacd9+J4irmpYwFiqy+NFdfI9T0jBnvUKZBuQCOza/ahty 3CyOjM4kz3/VpT2SSuVwDyMrodFqMUAzPCuqJg2ZpJggyAjFU0nuLYofxdSHSbKi53w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382950; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Proofpoint-Reinject:X-QCInternal: X-QCInternal:X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID: X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=ld0xUfOeplPnTAArccOGzp5nV4uwR85j8p6Gfdq/MWg=; b=4bOQn5Kwq3xqD8kII11NTuM2lCDKBruC3H3HL9jJ2ZZ8M8qeSXbrjqwfTNm04dNVBU4O 2aPGMyQyOZB/gXFV+XhNm7ah0q0Hkz2TATL6J/t/wi7TKerVL3fAHXL+iS2jexf/eLvOj +GGqiJUiEdDYGrmhBhvdHvix82G9P0hu5Bgf/uecRvuSFaMp2oXBXNB+ngBo7u7NjNXpO 5qZmljgZH8O1cfep7CXI2yZWedLMB54c4EtiVuSca/mzy9xNMRNW1OuNaohS0Kq2C9x3D 0dcRjlct28gU3fIEYeXk+fNI3UAb0/tYhFk9ASW8z81hTfCjJ0QqK6V31w+yUuMXBuw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=IRFKvRnu; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B747606A330; Fri, 4 Dec 2026 11:15:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9B747606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=IRFKvRnu Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B45HtUA2771480; Fri, 4 Dec 2026 11:15:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=ld0xUfOeplPnTAArccOGzp5nV4uwR85j8p6 Gfdq/MWg=; b=IRFKvRnul6T0E0H8wWIGcLEkNzgFc77/ZyWlUY8bXtd7GFGgXRO qI81tC/TtPoGDJ9DDja1DKBLDp883Ux5xUh22D3Tqqkc6VM0kWBtPKD4zaj8+EP1 pje1b19QqzafreBxAyi8/ZfivjztHvj2D5IZEYvONDnXQHniHgvQcG1Hri4gw7TP zXKQCzfixb1ZQ55po0IaDz4QRw7Vpile1a7U7qoKFB5kah/QwLDjLihymVu1aNr/ AejgWWCZpL4IaQuTQ+4C2zpsk0hc6hHpDFQvmgtW/7FmwrWNQ4NQ6C4ktCvkDek9 6/dt+9zqkIWeij9aVlBZpoQWrBg9iC2QnWA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7s12qp-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 11:15:19 +0000 (GMT) Received: from pps.filterd (apblrppmta02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4BFGRd3383391; Fri, 4 Dec 2026 11:15:16 GMT Received: from hu-devc-blr-u24-a.qualcomm.com (hu-anuppate-blr.qualcomm.com [10.131.36.165]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 6B4BFGVK3383374 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 11:15:16 +0000 (GMT) Received: by hu-devc-blr-u24-a.qualcomm.com (Postfix, from userid 486687) id 4189322C1A; Fri, 4 Dec 2026 16:45:16 +0530 (+0530) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Rahul Pathak , Stephen Boyd , Brian Masney , Jerome Brunet , Thomas Gleixner , Radu Rendec , Jassi Brar Cc: Sunil V L , Himanshu Chauhan , Atish Patra , Anup Patel , Amirreza Zarrabi , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Anup Patel Subject: [PATCH v3 0/5] Parallel message send using SBI MPXY Date: Fri, 4 Dec 2026 16:44:59 +0530 Message-ID: <20261204111504.3362889-1-anup.patel@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA0NCBTYWx0ZWRfX6Ya/YDnom7sh P+m0ApKJxMhgNlMx3/tw6OSuel9dJbiapVJGGxNfh8A0SYifgU4L4P/FzLaio5I+JNoTHsSxCqN FSiTBjRCi1RU+YyYeD4AzJy6oEnKDVV8QwD6f1xxL2N7CYFkV3HY8RU+GyMmbUPuFlCeg4/uBk5 l4fdJdxuX+2jskTjDnM8RltnFbEwSO+9cJk/SElGNimSyiXM8MGZquKbUBKMfXaZU98/DkVmSOf J452YV8BE2MDsZ4oc/cGsOCZR6Apvq/FqHA+yB7PiozfN+TClzXy/U//fhln+8U8nkIvnoVd8TH ROgACmBW2SgTZ4Fm7fxIOQ6EbrFXM6BGFtfuNithiRxcqEnvEXiFtuJfEFXwUeT5F2/N0xp4gIO dSjOJGIsB+Bf4mwKO6gcNgOpV3Cbh7QhQVyUSGjRdaWtImv8jCVRmzkSyx9fzoy2xqNgO7wNw9d 6ggt2Xi5xDLBq/plUDg== X-Proofpoint-ORIG-GUID: B2ZGEiKbXiqfO8oi0QaqHlK5SXcSEYYa X-Proofpoint-GUID: B2ZGEiKbXiqfO8oi0QaqHlK5SXcSEYYa X-Authority-Analysis: v=2.4 cv=AOKPfg2Y c=1 sm=1 tr=0 ts=6b12a0c8 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=NEAV23lmAAAA:8 a=VwQbUJbxAAAA:8 a=Eq47slker8iAUq9QmCsA:9 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA0NCBTYWx0ZWRfXwO8SRv+FK55f aB6521VV4a3L7geMvcsKSVMW1Vq75FB1oRJCqcExmxiS8oWi6hsO9cyspF2GjCiaU1BPG2GY4GW 4jhWoueOOBvxm2rvLSBy6nVRiutxMUc= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_01,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 spamscore=0 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040044 This series primarily extends mailbox framework and SBI MPXY mailbox driver to allow sending messages in-parallel from multiple CPUs. It also serves as perparatory series for the upcoming RISC-V ACPI EINJ support and RISC-V TEE support. These patches can also be found in the riscv_mpxy_imp_v3 branch at: https://github.com/avpatel/linux.git Changes since v2: - Rebase on Linux-7.4-rc5 - Added tx_len checks in sbi_mpxy_send_message_with_resp() and sbi_mpxy_send_message_without_resp() for PATCH1 - Dropped last paragraph in Documentation/driver-api/mailbox.rst added by PATCH4 since it was citing a non-existent source file. Changes since v1: - Rebase on Linux-7.4-rc2 - Replace PATCH2 to factor-out per-hart MPXY shared-memory acquisition with a new patch to Use irqsave to prevent interrupt when accessing MPXY shared memory - Adopt Jassi's implementation of mbox_send_message_sync() from: https://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox.git/log/?h=jsb/rfc-synch-xfer Anup Patel (2): RISC-V: Move common MPXY helper routines to arch/riscv RISC-V: Prevent interrupt when accessing MPXY shared memory Jassi Brar (3): mailbox: add direct synchronous transmit API mailbox: document direct synchronous transmit mailbox: convert RISC-V SBI MPXY to direct transmit Documentation/driver-api/mailbox.rst | 346 ++++++++++++++- arch/riscv/include/asm/sbi.h | 86 +++- arch/riscv/kernel/Makefile | 2 +- arch/riscv/kernel/sbi_mpxy.c | 344 +++++++++++++++ drivers/clk/clk-rpmi.c | 3 - drivers/irqchip/irq-riscv-rpmi-sysmsi.c | 3 - drivers/mailbox/mailbox.c | 144 +++++- drivers/mailbox/riscv-sbi-mpxy-mbox.c | 415 +++--------------- .../pmdomain/riscv/riscv-rpmi-device-power.c | 3 - include/linux/mailbox/riscv-rpmi-message.h | 17 +- include/linux/mailbox_client.h | 9 +- include/linux/mailbox_controller.h | 38 ++ 12 files changed, 1006 insertions(+), 404 deletions(-) create mode 100644 arch/riscv/kernel/sbi_mpxy.c -- 2.43.0