mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_ffa: Unmap RxTx buffers on device shutdown
@ 2026-08-26 22:23 Maxi Saparov
  2026-08-26 22:47 ` Maxi Saparov
  0 siblings, 1 reply; 3+ messages in thread
From: Maxi Saparov @ 2026-08-26 22:23 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: linux-arm-kernel, linux-kernel, Seth Forshee,
	Serapheim Dimitropoulos, Maxi Saparov

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-01  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 22:23 [PATCH] firmware: arm_ffa: Unmap RxTx buffers on device shutdown Maxi Saparov
2026-08-26 22:47 ` Maxi Saparov
2026-09-01  7:25   ` Sudeep Holla

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®