From: Maxi Saparov <maxi.saparov@gmail.com>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Seth Forshee <sforshee@nvidia.com>,
Serapheim Dimitropoulos <sdimitropoulos@coreweave.com>,
Maxi Saparov <masaparov@coreweave.com>
Subject: [PATCH] firmware: arm_ffa: Unmap RxTx buffers on device shutdown
Date: Wed, 26 Aug 2026 18:23:37 -0400 [thread overview]
Message-ID: <20260826222337.73480-1-maxi.saparov@gmail.com> (raw)
From: Maxi Saparov <masaparov@coreweave.com>
The SPMC retains the RxTx buffer registration of the current kernel
across kexec. FFA_RXTX_MAP from the kexec'ed kernel is then denied
because the buffers of the previous kernel are still registered, and
the driver fails to probe:
ARM FF-A: Driver version 1.2
ARM FF-A: Firmware version 1.1 found
ARM FF-A: failed to register FFA RxTx buffers
The notification bitmap, when one was created, is retained in the
same way and a later FFA_NOTIFICATION_BITMAP_CREATE is denied.
Add a shutdown callback that releases the notification resources and
unmaps the RxTx buffers. device_shutdown() runs on the kexec path, so
the next kernel finds the SPMC in a clean state and can register its
own buffers. On a regular reboot or power off the extra teardown is
harmless.
Observed on NVIDIA GB200 systems when kexec'ing between kernels with
the FF-A driver active.
Signed-off-by: Maxi Saparov <masaparov@coreweave.com>
---
drivers/firmware/arm_ffa/driver.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 8654b3365c9b..04948be13b08 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -2222,9 +2222,16 @@ static void ffa_remove(struct platform_device *pdev)
drv_info = NULL;
}
+static void ffa_shutdown(struct platform_device *pdev)
+{
+ ffa_notifications_cleanup();
+ ffa_rxtx_unmap();
+}
+
static struct platform_driver ffa_driver = {
.probe = ffa_probe,
.remove = ffa_remove,
+ .shutdown = ffa_shutdown,
.driver = {
.name = FFA_PLATFORM_NAME,
},
base-commit: 3b5f4b83c4abc0c9b0a7b9e2b44e816611b7f2ec
--
2.55.0
next reply other threads:[~2026-08-26 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 22:23 Maxi Saparov [this message]
2026-08-26 22:47 ` Maxi Saparov
2026-09-01 7:25 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826222337.73480-1-maxi.saparov@gmail.com \
--to=maxi.saparov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masaparov@coreweave.com \
--cc=sdimitropoulos@coreweave.com \
--cc=sforshee@nvidia.com \
--cc=sudeep.holla@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®