* [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe
@ 2026-05-08 17:54 Sudeep Holla
2026-05-08 17:54 ` [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall" Sudeep Holla
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Sudeep Holla @ 2026-05-08 17:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Sudeep Holla, Yeoreum Yun
This series moves the Arm FF-A core initialisation into the driver model by
converting the core bring-up path to a platform driver probe/remove flow.
The first patch reverts the earlier rootfs_initcall change. That initcall
ordering workaround is not a proper solution and potentially conflicts with
pKVM FF-A proxy requirement.
The FF-A core is then registered as a platform driver. For now, the driver
creates a synthetic arm-ffa platform device internally to bind the driver.
This is intended as a temporary bridge until ACPI and devicetree describe
the FF-A core device or object directly, at which point the internal device
creation can be dropped.
The series also makes the synthetic core device the parent of enumerated
FF-A partition devices, keeping the FF-A device hierarchy anchored under the
core transport device.
Finally, when protected KVM is enabled, FF-A probing is deferred until pKVM
has completed initialisation. The kernel pKVM FF-A proxy must perform its
own FF-A version negotiation and setup before the normal FF-A driver starts
using the transport, so the platform driver probe path now allows the driver
core to retry once that dependency is ready.
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
Sudeep Holla (3):
firmware: arm_ffa: Register core as a platform driver
firmware: arm_ffa: Set the core device as FF-A device parent
firmware: arm_ffa: Defer probe until pKVM is initialized
Yeoreum Yun (1):
Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
drivers/firmware/arm_ffa/bus.c | 3 +-
drivers/firmware/arm_ffa/common.h | 4 +--
drivers/firmware/arm_ffa/driver.c | 64 ++++++++++++++++++++++++++++++++++-----
drivers/firmware/arm_ffa/smccc.c | 2 +-
include/linux/arm_ffa.h | 4 +--
5 files changed, 63 insertions(+), 14 deletions(-)
---
base-commit: 917719c412c48687d4a176965d1fa35320ec457c
change-id: 20260508-b4-ffa_plat_dev-39b98bb79ae9
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
@ 2026-05-08 17:54 ` Sudeep Holla
2026-05-08 17:54 ` [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Sudeep Holla
` (4 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Sudeep Holla @ 2026-05-08 17:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Sudeep Holla, Yeoreum Yun
From: Yeoreum Yun <yeoreum.yun@arm.com>
This reverts commit 0e0546eabcd6c19765a8dbf5b5db3723e7b0ea75, which was
added to address ordering issues with the IMA LSM initialisation where
the TPM would not be fully ready by the time IMA wanted it. This has
been resolved within IMA by retrying setup during late_initcall_sync if
the TPM is not available at first.
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_ffa/driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index eb2782848283..6efb85787e6e 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -2106,7 +2106,7 @@ static int __init ffa_init(void)
kfree(drv_info);
return ret;
}
-rootfs_initcall(ffa_init);
+module_init(ffa_init);
static void __exit ffa_exit(void)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
2026-05-08 17:54 ` [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall" Sudeep Holla
@ 2026-05-08 17:54 ` Sudeep Holla
2026-05-08 18:41 ` Yeoreum Yun
2026-05-23 0:11 ` Nathan Chancellor
2026-05-08 17:54 ` [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent Sudeep Holla
` (3 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Sudeep Holla @ 2026-05-08 17:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Sudeep Holla, Yeoreum Yun
Move the FF-A core bring-up and teardown paths into platform driver
probe and remove callbacks, and register a synthetic arm-ffa platform
device to bind the driver.
This makes the FF-A core lifetime follow the driver model while keeping
the device creation internal to the FF-A core. Use normal platform driver
registration so the probe path has standard driver-core semantics.
The synthetic platform device is a temporary bridge until ACPI and
devicetree describe the FF-A core device or object. Once those firmware
description paths are defined, the internal platform device creation can
be dropped and the driver can bind to the firmware-described device
directly.
Since the transport selection now happens from the platform probe path,
drop the __init annotation from ffa_transport_init().
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_ffa/common.h | 4 +--
drivers/firmware/arm_ffa/driver.c | 53 ++++++++++++++++++++++++++++++++++-----
drivers/firmware/arm_ffa/smccc.c | 2 +-
3 files changed, 50 insertions(+), 9 deletions(-)
diff --git a/drivers/firmware/arm_ffa/common.h b/drivers/firmware/arm_ffa/common.h
index 9c6425a81d0d..5cdf4bd222c6 100644
--- a/drivers/firmware/arm_ffa/common.h
+++ b/drivers/firmware/arm_ffa/common.h
@@ -18,9 +18,9 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
void ffa_device_match_uuid(struct ffa_device *ffa_dev, const uuid_t *uuid);
#ifdef CONFIG_ARM_FFA_SMCCC
-int __init ffa_transport_init(ffa_fn **invoke_ffa_fn);
+int ffa_transport_init(ffa_fn **invoke_ffa_fn);
#else
-static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
+static inline int ffa_transport_init(ffa_fn **invoke_ffa_fn)
{
return -EOPNOTSUPP;
}
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 6efb85787e6e..97ecdb5dac09 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -36,6 +36,7 @@
#include <linux/mm.h>
#include <linux/mutex.h>
#include <linux/of_irq.h>
+#include <linux/platform_device.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/smp.h>
@@ -46,6 +47,7 @@
#define FFA_DRIVER_VERSION FFA_VERSION_1_2
#define FFA_MIN_VERSION FFA_VERSION_1_0
+#define FFA_PLATFORM_NAME "arm-ffa"
#define SENDER_ID_MASK GENMASK(31, 16)
#define RECEIVER_ID_MASK GENMASK(15, 0)
@@ -114,6 +116,7 @@ struct ffa_drv_info {
};
static struct ffa_drv_info *drv_info;
+static struct platform_device *ffa_pdev;
/*
* The driver must be able to support all the versions from the earliest
@@ -2029,7 +2032,7 @@ static void ffa_notifications_setup(void)
ffa_notifications_cleanup();
}
-static int __init ffa_init(void)
+static int ffa_probe(struct platform_device *pdev)
{
int ret;
u32 buf_sz;
@@ -2042,6 +2045,7 @@ static int __init ffa_init(void)
drv_info = kzalloc_obj(*drv_info);
if (!drv_info)
return -ENOMEM;
+ platform_set_drvdata(pdev, drv_info);
ret = ffa_version_check(&drv_info->version);
if (ret)
@@ -2103,19 +2107,56 @@ static int __init ffa_init(void)
free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);
free_pages_exact(drv_info->rx_buffer, rxtx_bufsz);
free_drv_info:
+ platform_set_drvdata(pdev, NULL);
kfree(drv_info);
+ drv_info = NULL;
return ret;
}
-module_init(ffa_init);
-static void __exit ffa_exit(void)
+static void ffa_remove(struct platform_device *pdev)
{
+ struct ffa_drv_info *info = platform_get_drvdata(pdev);
+
ffa_notifications_cleanup();
ffa_partitions_cleanup();
ffa_rxtx_unmap();
- free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz);
- free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz);
- kfree(drv_info);
+ free_pages_exact(info->tx_buffer, info->rxtx_bufsz);
+ free_pages_exact(info->rx_buffer, info->rxtx_bufsz);
+ kfree(info);
+ platform_set_drvdata(pdev, NULL);
+ drv_info = NULL;
+}
+
+static struct platform_driver ffa_driver = {
+ .probe = ffa_probe,
+ .remove = ffa_remove,
+ .driver = {
+ .name = FFA_PLATFORM_NAME,
+ },
+};
+
+static int __init ffa_init(void)
+{
+ int ret;
+
+ ffa_pdev = platform_device_register_simple(FFA_PLATFORM_NAME,
+ PLATFORM_DEVID_NONE,
+ NULL, 0);
+ if (IS_ERR(ffa_pdev))
+ return PTR_ERR(ffa_pdev);
+
+ ret = platform_driver_register(&ffa_driver);
+ if (ret)
+ platform_device_unregister(ffa_pdev);
+
+ return ret;
+}
+module_init(ffa_init);
+
+static void __exit ffa_exit(void)
+{
+ platform_device_unregister(ffa_pdev);
+ platform_driver_unregister(&ffa_driver);
}
module_exit(ffa_exit);
diff --git a/drivers/firmware/arm_ffa/smccc.c b/drivers/firmware/arm_ffa/smccc.c
index 4d85bfff0a4e..e6125dd9f58f 100644
--- a/drivers/firmware/arm_ffa/smccc.c
+++ b/drivers/firmware/arm_ffa/smccc.c
@@ -17,7 +17,7 @@ static void __arm_ffa_fn_hvc(ffa_value_t args, ffa_value_t *res)
arm_smccc_1_2_hvc(&args, res);
}
-int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
+int ffa_transport_init(ffa_fn **invoke_ffa_fn)
{
enum arm_smccc_conduit conduit;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
2026-05-08 17:54 ` [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall" Sudeep Holla
2026-05-08 17:54 ` [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Sudeep Holla
@ 2026-05-08 17:54 ` Sudeep Holla
2026-05-08 18:42 ` Yeoreum Yun
2026-05-08 17:54 ` [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized Sudeep Holla
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sudeep Holla @ 2026-05-08 17:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Sudeep Holla, Yeoreum Yun
Pass a parent device into ffa_device_register() and use the synthetic
arm-ffa platform device as the parent for each registered FF-A device.
This keeps the enumerated FF-A partition devices anchored below the FF-A
core device in the driver model, matching the platform-driver conversion
of the core transport.
Suggested-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_ffa/bus.c | 3 ++-
drivers/firmware/arm_ffa/driver.c | 5 +++--
include/linux/arm_ffa.h | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
index 9576862d89c4..e05fe0b6049c 100644
--- a/drivers/firmware/arm_ffa/bus.c
+++ b/drivers/firmware/arm_ffa/bus.c
@@ -190,7 +190,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev)
struct ffa_device *
ffa_device_register(const struct ffa_partition_info *part_info,
- const struct ffa_ops *ops)
+ const struct ffa_ops *ops, struct device *parent)
{
int id, ret;
struct device *dev;
@@ -210,6 +210,7 @@ ffa_device_register(const struct ffa_partition_info *part_info,
}
dev = &ffa_dev->dev;
+ dev->parent = parent;
dev->bus = &ffa_bus_type;
dev->release = ffa_release_device;
dev->dma_mask = &dev->coherent_dma_mask;
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 97ecdb5dac09..e9d7dc71c06d 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -1688,7 +1688,7 @@ static int ffa_setup_host_partition(int vm_id)
int ret;
buf.id = vm_id;
- ffa_dev = ffa_device_register(&buf, &ffa_drv_ops);
+ ffa_dev = ffa_device_register(&buf, &ffa_drv_ops, &ffa_pdev->dev);
if (!ffa_dev) {
pr_err("%s: failed to register host partition ID 0x%x\n",
__func__, vm_id);
@@ -1758,7 +1758,8 @@ static int ffa_setup_partitions(void)
* provides UUID here for each partition as part of the
* discovery API and the same is passed.
*/
- ffa_dev = ffa_device_register(tpbuf, &ffa_drv_ops);
+ ffa_dev = ffa_device_register(tpbuf, &ffa_drv_ops,
+ &ffa_pdev->dev);
if (!ffa_dev) {
pr_err("%s: failed to register partition ID 0x%x\n",
__func__, tpbuf->id);
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
index 81e603839c4a..17eca3dfc59e 100644
--- a/include/linux/arm_ffa.h
+++ b/include/linux/arm_ffa.h
@@ -173,7 +173,7 @@ struct ffa_partition_info;
#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
struct ffa_device *
ffa_device_register(const struct ffa_partition_info *part_info,
- const struct ffa_ops *ops);
+ const struct ffa_ops *ops, struct device *parent);
void ffa_device_unregister(struct ffa_device *ffa_dev);
int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
const char *mod_name);
@@ -184,7 +184,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
#else
static inline struct ffa_device *
ffa_device_register(const struct ffa_partition_info *part_info,
- const struct ffa_ops *ops)
+ const struct ffa_ops *ops, struct device *parent)
{
return NULL;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
` (2 preceding siblings ...)
2026-05-08 17:54 ` [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent Sudeep Holla
@ 2026-05-08 17:54 ` Sudeep Holla
2026-05-08 18:45 ` Yeoreum Yun
2026-05-17 11:36 ` [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
2026-05-17 11:44 ` Sudeep Holla
5 siblings, 1 reply; 14+ messages in thread
From: Sudeep Holla @ 2026-05-08 17:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Sudeep Holla, Yeoreum Yun
When protected KVM is enabled, the kernel includes a pKVM FF-A proxy
that sits in front of the normal FF-A driver. The proxy has to perform
its own FF-A version negotiation and setup first, so that it can mediate
subsequent FF-A traffic correctly.
Defer FF-A core probing until pKVM has completed initialization. This
keeps the normal driver from negotiating the FF-A version or performing
other transport setup before the pKVM proxy is ready, and lets the
driver model retry probing once the protected KVM state required by the
FF-A transport is available.
Suggested-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/firmware/arm_ffa/driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index e9d7dc71c06d..1fba064c2aba 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -43,6 +43,8 @@
#include <linux/uuid.h>
#include <linux/xarray.h>
+#include <asm/virt.h>
+
#include "common.h"
#define FFA_DRIVER_VERSION FFA_VERSION_1_2
@@ -2039,6 +2041,10 @@ static int ffa_probe(struct platform_device *pdev)
u32 buf_sz;
size_t rxtx_bufsz = SZ_4K;
+ if (IS_BUILTIN(CONFIG_ARM_FFA_TRANSPORT) &&
+ is_protected_kvm_enabled() && !is_pkvm_initialized())
+ return -EPROBE_DEFER;
+
ret = ffa_transport_init(&invoke_ffa_fn);
if (ret)
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver
2026-05-08 17:54 ` [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Sudeep Holla
@ 2026-05-08 18:41 ` Yeoreum Yun
2026-05-23 0:11 ` Nathan Chancellor
1 sibling, 0 replies; 14+ messages in thread
From: Yeoreum Yun @ 2026-05-08 18:41 UTC (permalink / raw)
To: Sudeep Holla
Cc: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
LGTM.
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
On Fri, May 08, 2026 at 06:54:16PM +0100, Sudeep Holla wrote:
> Move the FF-A core bring-up and teardown paths into platform driver
> probe and remove callbacks, and register a synthetic arm-ffa platform
> device to bind the driver.
>
> This makes the FF-A core lifetime follow the driver model while keeping
> the device creation internal to the FF-A core. Use normal platform driver
> registration so the probe path has standard driver-core semantics.
>
> The synthetic platform device is a temporary bridge until ACPI and
> devicetree describe the FF-A core device or object. Once those firmware
> description paths are defined, the internal platform device creation can
> be dropped and the driver can bind to the firmware-described device
> directly.
>
> Since the transport selection now happens from the platform probe path,
> drop the __init annotation from ffa_transport_init().
>
> Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> ---
> drivers/firmware/arm_ffa/common.h | 4 +--
> drivers/firmware/arm_ffa/driver.c | 53 ++++++++++++++++++++++++++++++++++-----
> drivers/firmware/arm_ffa/smccc.c | 2 +-
> 3 files changed, 50 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/firmware/arm_ffa/common.h b/drivers/firmware/arm_ffa/common.h
> index 9c6425a81d0d..5cdf4bd222c6 100644
> --- a/drivers/firmware/arm_ffa/common.h
> +++ b/drivers/firmware/arm_ffa/common.h
> @@ -18,9 +18,9 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
> void ffa_device_match_uuid(struct ffa_device *ffa_dev, const uuid_t *uuid);
>
> #ifdef CONFIG_ARM_FFA_SMCCC
> -int __init ffa_transport_init(ffa_fn **invoke_ffa_fn);
> +int ffa_transport_init(ffa_fn **invoke_ffa_fn);
> #else
> -static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
> +static inline int ffa_transport_init(ffa_fn **invoke_ffa_fn)
> {
> return -EOPNOTSUPP;
> }
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index 6efb85787e6e..97ecdb5dac09 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -36,6 +36,7 @@
> #include <linux/mm.h>
> #include <linux/mutex.h>
> #include <linux/of_irq.h>
> +#include <linux/platform_device.h>
> #include <linux/scatterlist.h>
> #include <linux/slab.h>
> #include <linux/smp.h>
> @@ -46,6 +47,7 @@
>
> #define FFA_DRIVER_VERSION FFA_VERSION_1_2
> #define FFA_MIN_VERSION FFA_VERSION_1_0
> +#define FFA_PLATFORM_NAME "arm-ffa"
>
> #define SENDER_ID_MASK GENMASK(31, 16)
> #define RECEIVER_ID_MASK GENMASK(15, 0)
> @@ -114,6 +116,7 @@ struct ffa_drv_info {
> };
>
> static struct ffa_drv_info *drv_info;
> +static struct platform_device *ffa_pdev;
>
> /*
> * The driver must be able to support all the versions from the earliest
> @@ -2029,7 +2032,7 @@ static void ffa_notifications_setup(void)
> ffa_notifications_cleanup();
> }
>
> -static int __init ffa_init(void)
> +static int ffa_probe(struct platform_device *pdev)
> {
> int ret;
> u32 buf_sz;
> @@ -2042,6 +2045,7 @@ static int __init ffa_init(void)
> drv_info = kzalloc_obj(*drv_info);
> if (!drv_info)
> return -ENOMEM;
> + platform_set_drvdata(pdev, drv_info);
>
> ret = ffa_version_check(&drv_info->version);
> if (ret)
> @@ -2103,19 +2107,56 @@ static int __init ffa_init(void)
> free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);
> free_pages_exact(drv_info->rx_buffer, rxtx_bufsz);
> free_drv_info:
> + platform_set_drvdata(pdev, NULL);
> kfree(drv_info);
> + drv_info = NULL;
> return ret;
> }
> -module_init(ffa_init);
>
> -static void __exit ffa_exit(void)
> +static void ffa_remove(struct platform_device *pdev)
> {
> + struct ffa_drv_info *info = platform_get_drvdata(pdev);
> +
> ffa_notifications_cleanup();
> ffa_partitions_cleanup();
> ffa_rxtx_unmap();
> - free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz);
> - free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz);
> - kfree(drv_info);
> + free_pages_exact(info->tx_buffer, info->rxtx_bufsz);
> + free_pages_exact(info->rx_buffer, info->rxtx_bufsz);
> + kfree(info);
> + platform_set_drvdata(pdev, NULL);
> + drv_info = NULL;
> +}
> +
> +static struct platform_driver ffa_driver = {
> + .probe = ffa_probe,
> + .remove = ffa_remove,
> + .driver = {
> + .name = FFA_PLATFORM_NAME,
> + },
> +};
> +
> +static int __init ffa_init(void)
> +{
> + int ret;
> +
> + ffa_pdev = platform_device_register_simple(FFA_PLATFORM_NAME,
> + PLATFORM_DEVID_NONE,
> + NULL, 0);
> + if (IS_ERR(ffa_pdev))
> + return PTR_ERR(ffa_pdev);
> +
> + ret = platform_driver_register(&ffa_driver);
> + if (ret)
> + platform_device_unregister(ffa_pdev);
> +
> + return ret;
> +}
> +module_init(ffa_init);
> +
> +static void __exit ffa_exit(void)
> +{
> + platform_device_unregister(ffa_pdev);
> + platform_driver_unregister(&ffa_driver);
> }
> module_exit(ffa_exit);
>
> diff --git a/drivers/firmware/arm_ffa/smccc.c b/drivers/firmware/arm_ffa/smccc.c
> index 4d85bfff0a4e..e6125dd9f58f 100644
> --- a/drivers/firmware/arm_ffa/smccc.c
> +++ b/drivers/firmware/arm_ffa/smccc.c
> @@ -17,7 +17,7 @@ static void __arm_ffa_fn_hvc(ffa_value_t args, ffa_value_t *res)
> arm_smccc_1_2_hvc(&args, res);
> }
>
> -int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
> +int ffa_transport_init(ffa_fn **invoke_ffa_fn)
> {
> enum arm_smccc_conduit conduit;
>
>
> --
> 2.43.0
>
--
Sincerely,
Yeoreum Yun
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent
2026-05-08 17:54 ` [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent Sudeep Holla
@ 2026-05-08 18:42 ` Yeoreum Yun
0 siblings, 0 replies; 14+ messages in thread
From: Yeoreum Yun @ 2026-05-08 18:42 UTC (permalink / raw)
To: Sudeep Holla
Cc: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
LGTM.
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
> Pass a parent device into ffa_device_register() and use the synthetic
> arm-ffa platform device as the parent for each registered FF-A device.
>
> This keeps the enumerated FF-A partition devices anchored below the FF-A
> core device in the driver model, matching the platform-driver conversion
> of the core transport.
>
> Suggested-by: Yeoreum Yun <yeoreum.yun@arm.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> ---
> drivers/firmware/arm_ffa/bus.c | 3 ++-
> drivers/firmware/arm_ffa/driver.c | 5 +++--
> include/linux/arm_ffa.h | 4 ++--
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
> index 9576862d89c4..e05fe0b6049c 100644
> --- a/drivers/firmware/arm_ffa/bus.c
> +++ b/drivers/firmware/arm_ffa/bus.c
> @@ -190,7 +190,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev)
>
> struct ffa_device *
> ffa_device_register(const struct ffa_partition_info *part_info,
> - const struct ffa_ops *ops)
> + const struct ffa_ops *ops, struct device *parent)
> {
> int id, ret;
> struct device *dev;
> @@ -210,6 +210,7 @@ ffa_device_register(const struct ffa_partition_info *part_info,
> }
>
> dev = &ffa_dev->dev;
> + dev->parent = parent;
> dev->bus = &ffa_bus_type;
> dev->release = ffa_release_device;
> dev->dma_mask = &dev->coherent_dma_mask;
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index 97ecdb5dac09..e9d7dc71c06d 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -1688,7 +1688,7 @@ static int ffa_setup_host_partition(int vm_id)
> int ret;
>
> buf.id = vm_id;
> - ffa_dev = ffa_device_register(&buf, &ffa_drv_ops);
> + ffa_dev = ffa_device_register(&buf, &ffa_drv_ops, &ffa_pdev->dev);
> if (!ffa_dev) {
> pr_err("%s: failed to register host partition ID 0x%x\n",
> __func__, vm_id);
> @@ -1758,7 +1758,8 @@ static int ffa_setup_partitions(void)
> * provides UUID here for each partition as part of the
> * discovery API and the same is passed.
> */
> - ffa_dev = ffa_device_register(tpbuf, &ffa_drv_ops);
> + ffa_dev = ffa_device_register(tpbuf, &ffa_drv_ops,
> + &ffa_pdev->dev);
> if (!ffa_dev) {
> pr_err("%s: failed to register partition ID 0x%x\n",
> __func__, tpbuf->id);
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index 81e603839c4a..17eca3dfc59e 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -173,7 +173,7 @@ struct ffa_partition_info;
> #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
> struct ffa_device *
> ffa_device_register(const struct ffa_partition_info *part_info,
> - const struct ffa_ops *ops);
> + const struct ffa_ops *ops, struct device *parent);
> void ffa_device_unregister(struct ffa_device *ffa_dev);
> int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
> const char *mod_name);
> @@ -184,7 +184,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
> #else
> static inline struct ffa_device *
> ffa_device_register(const struct ffa_partition_info *part_info,
> - const struct ffa_ops *ops)
> + const struct ffa_ops *ops, struct device *parent)
> {
> return NULL;
> }
>
> --
> 2.43.0
>
--
Sincerely,
Yeoreum Yun
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized
2026-05-08 17:54 ` [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized Sudeep Holla
@ 2026-05-08 18:45 ` Yeoreum Yun
0 siblings, 0 replies; 14+ messages in thread
From: Yeoreum Yun @ 2026-05-08 18:45 UTC (permalink / raw)
To: Sudeep Holla
Cc: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Look good to me.
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
> When protected KVM is enabled, the kernel includes a pKVM FF-A proxy
> that sits in front of the normal FF-A driver. The proxy has to perform
> its own FF-A version negotiation and setup first, so that it can mediate
> subsequent FF-A traffic correctly.
>
> Defer FF-A core probing until pKVM has completed initialization. This
> keeps the normal driver from negotiating the FF-A version or performing
> other transport setup before the pKVM proxy is ready, and lets the
> driver model retry probing once the protected KVM state required by the
> FF-A transport is available.
>
> Suggested-by: Yeoreum Yun <yeoreum.yun@arm.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> ---
> drivers/firmware/arm_ffa/driver.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index e9d7dc71c06d..1fba064c2aba 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -43,6 +43,8 @@
> #include <linux/uuid.h>
> #include <linux/xarray.h>
>
> +#include <asm/virt.h>
> +
> #include "common.h"
>
> #define FFA_DRIVER_VERSION FFA_VERSION_1_2
> @@ -2039,6 +2041,10 @@ static int ffa_probe(struct platform_device *pdev)
> u32 buf_sz;
> size_t rxtx_bufsz = SZ_4K;
>
> + if (IS_BUILTIN(CONFIG_ARM_FFA_TRANSPORT) &&
> + is_protected_kvm_enabled() && !is_pkvm_initialized())
> + return -EPROBE_DEFER;
> +
> ret = ffa_transport_init(&invoke_ffa_fn);
> if (ret)
> return ret;
>
> --
> 2.43.0
>
--
Sincerely,
Yeoreum Yun
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
` (3 preceding siblings ...)
2026-05-08 17:54 ` [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized Sudeep Holla
@ 2026-05-17 11:36 ` Sudeep Holla
2026-05-17 11:54 ` Sudeep Holla
2026-05-17 11:44 ` Sudeep Holla
5 siblings, 1 reply; 14+ messages in thread
From: Sudeep Holla @ 2026-05-17 11:36 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm, Sudeep Holla
Cc: Yeoreum Yun
On Fri, 08 May 2026 18:54:14 +0100, Sudeep Holla wrote:
> This series moves the Arm FF-A core initialisation into the driver model by
> converting the core bring-up path to a platform driver probe/remove flow.
>
> The first patch reverts the earlier rootfs_initcall change. That initcall
> ordering workaround is not a proper solution and potentially conflicts with
> pKVM FF-A proxy requirement.
>
> [...]
Applied to sudeep.holla/linux (for-next/ffa/updates), thanks!
[1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
https://git.kernel.org/sudeep.holla/c/1b4c1c4d75a8
[2/4] firmware: arm_ffa: Register core as a platform driver
https://git.kernel.org/sudeep.holla/c/d10175dd517a
[3/4] firmware: arm_ffa: Set the core device as FF-A device parent
https://git.kernel.org/sudeep.holla/c/8bdff2dda405
[4/4] firmware: arm_ffa: Defer probe until pKVM is initialized
https://git.kernel.org/sudeep.holla/c/216d4772b411
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
` (4 preceding siblings ...)
2026-05-17 11:36 ` [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
@ 2026-05-17 11:44 ` Sudeep Holla
5 siblings, 0 replies; 14+ messages in thread
From: Sudeep Holla @ 2026-05-17 11:44 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm, Sudeep Holla
Cc: Yeoreum Yun
On Fri, 08 May 2026 18:54:14 +0100, Sudeep Holla wrote:
> This series moves the Arm FF-A core initialisation into the driver model by
> converting the core bring-up path to a platform driver probe/remove flow.
>
> The first patch reverts the earlier rootfs_initcall change. That initcall
> ordering workaround is not a proper solution and potentially conflicts with
> pKVM FF-A proxy requirement.
>
> [...]
Applied to sudeep.holla/linux (for-next/ffa/updates), thanks!
[1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
https://git.kernel.org/sudeep.holla/c/cc7e8f21b9f0
[2/4] firmware: arm_ffa: Register core as a platform driver
https://git.kernel.org/sudeep.holla/c/e659fc8e537c
[3/4] firmware: arm_ffa: Set the core device as FF-A device parent
https://git.kernel.org/sudeep.holla/c/7fe2ec9fb8e9
[4/4] firmware: arm_ffa: Defer probe until pKVM is initialized
https://git.kernel.org/sudeep.holla/c/3acc80a78e45
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe
2026-05-17 11:36 ` [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
@ 2026-05-17 11:54 ` Sudeep Holla
0 siblings, 0 replies; 14+ messages in thread
From: Sudeep Holla @ 2026-05-17 11:54 UTC (permalink / raw)
To: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm
Cc: Yeoreum Yun, Sudeep Holla
On Sun, May 17, 2026 at 12:36:45PM +0100, Sudeep Holla wrote:
> On Fri, 08 May 2026 18:54:14 +0100, Sudeep Holla wrote:
> > This series moves the Arm FF-A core initialisation into the driver model by
> > converting the core bring-up path to a platform driver probe/remove flow.
> >
> > The first patch reverts the earlier rootfs_initcall change. That initcall
> > ordering workaround is not a proper solution and potentially conflicts with
> > pKVM FF-A proxy requirement.
> >
> > [...]
>
> Applied to sudeep.holla/linux (for-next/ffa/updates), thanks!
>
> [1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
> https://git.kernel.org/sudeep.holla/c/1b4c1c4d75a8
> [2/4] firmware: arm_ffa: Register core as a platform driver
> https://git.kernel.org/sudeep.holla/c/d10175dd517a
> [3/4] firmware: arm_ffa: Set the core device as FF-A device parent
> https://git.kernel.org/sudeep.holla/c/8bdff2dda405
> [4/4] firmware: arm_ffa: Defer probe until pKVM is initialized
> https://git.kernel.org/sudeep.holla/c/216d4772b411
These are incorrect and fixed in later email, this was accidental send.
Please ignore.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver
2026-05-08 17:54 ` [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Sudeep Holla
2026-05-08 18:41 ` Yeoreum Yun
@ 2026-05-23 0:11 ` Nathan Chancellor
2026-05-23 4:50 ` Yeoreum Yun
1 sibling, 1 reply; 14+ messages in thread
From: Nathan Chancellor @ 2026-05-23 0:11 UTC (permalink / raw)
To: Sudeep Holla
Cc: linux-security-module, linux-kernel, linux-integrity,
linux-arm-kernel, kvmarm, Yeoreum Yun
Hi Sudeep,
On Fri, May 08, 2026 at 06:54:16PM +0100, Sudeep Holla wrote:
> Move the FF-A core bring-up and teardown paths into platform driver
> probe and remove callbacks, and register a synthetic arm-ffa platform
> device to bind the driver.
>
> This makes the FF-A core lifetime follow the driver model while keeping
> the device creation internal to the FF-A core. Use normal platform driver
> registration so the probe path has standard driver-core semantics.
>
> The synthetic platform device is a temporary bridge until ACPI and
> devicetree describe the FF-A core device or object. Once those firmware
> description paths are defined, the internal platform device creation can
> be dropped and the driver can bind to the firmware-described device
> directly.
>
> Since the transport selection now happens from the platform probe path,
> drop the __init annotation from ffa_transport_init().
>
> Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
I am seeing
arm-ffa arm-ffa: probe with driver arm-ffa failed with error -95
on my two arm64 test machines after this change landed in -next as
commit e659fc8e537c ("firmware: arm_ffa: Register core as a platform
driver"), is this expected? If so, perhaps it should be silenced?
Cheers,
Nathan
# bad: [c1ecb239fa3456529a32255359fc78b69eb9d847] Add linux-next specific files for 20260522
# good: [6779b50faa562e6cca1aa6a4649a4d764c6c7e28] Merge tag 'pci-v7.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
git bisect start 'c1ecb239fa3456529a32255359fc78b69eb9d847' '6779b50faa562e6cca1aa6a4649a4d764c6c7e28'
# bad: [c09bb0d7c56d56daed51e374409472c3fece9931] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git
git bisect bad c09bb0d7c56d56daed51e374409472c3fece9931
# bad: [42b0664d6f7b3d04f961e0709811280e52d4d39c] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git
git bisect bad 42b0664d6f7b3d04f961e0709811280e52d4d39c
# good: [63775c4b77cf7ac5863ae0e76f8626b80d217562] Merge branch 'mm-nonmm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
git bisect good 63775c4b77cf7ac5863ae0e76f8626b80d217562
# good: [f437936af5c74fddfdfcd2388a5f1eec2f9a105b] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git
git bisect good f437936af5c74fddfdfcd2388a5f1eec2f9a105b
# good: [01bf3f256f1ed15fa3884e4893e5a9d78fdfb2d6] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
git bisect good 01bf3f256f1ed15fa3884e4893e5a9d78fdfb2d6
# bad: [bee649097c8de82d9dccd3660c41163a6507e3d4] Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee.git
git bisect bad bee649097c8de82d9dccd3660c41163a6507e3d4
# bad: [82ccfdd8dd1e29229a3ed7c95a76578706fc4a1d] Merge branch 'for-next' of https://github.com/sophgo/linux.git
git bisect bad 82ccfdd8dd1e29229a3ed7c95a76578706fc4a1d
# good: [32bc5496b48174dbca1f187f710955ee4d9527a1] firmware: arm_scmi: Validate SENSOR_UPDATE payload size
git bisect good 32bc5496b48174dbca1f187f710955ee4d9527a1
# bad: [64251369d33884b431a52b89c60fabf466f3913c] Merge branches 'for-next/scmi/updates' and 'for-next/ffa/updates' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next
git bisect bad 64251369d33884b431a52b89c60fabf466f3913c
# bad: [70492cfce2a4d41e87bf46989028a90f4bc6b38f] firmware: smccc: Fix Arm SMCCC SOC_ID name call
git bisect bad 70492cfce2a4d41e87bf46989028a90f4bc6b38f
# bad: [7fe2ec9fb8e9a78dad8d6b1e551cb4d126e36f1e] firmware: arm_ffa: Set the core device as FF-A device parent
git bisect bad 7fe2ec9fb8e9a78dad8d6b1e551cb4d126e36f1e
# bad: [e659fc8e537c7a21d5d693d6f30d8852f2fa8d91] firmware: arm_ffa: Register core as a platform driver
git bisect bad e659fc8e537c7a21d5d693d6f30d8852f2fa8d91
# good: [cc7e8f21b9f0c229d68cf19a837cba82b5ac2d87] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall"
git bisect good cc7e8f21b9f0c229d68cf19a837cba82b5ac2d87
# first bad commit: [e659fc8e537c7a21d5d693d6f30d8852f2fa8d91] firmware: arm_ffa: Register core as a platform driver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver
2026-05-23 0:11 ` Nathan Chancellor
@ 2026-05-23 4:50 ` Yeoreum Yun
[not found] ` <20260523050555.GA1121518@ax162>
0 siblings, 1 reply; 14+ messages in thread
From: Yeoreum Yun @ 2026-05-23 4:50 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Sudeep Holla, yeoreum.yun, linux-security-module, linux-kernel,
linux-integrity, linux-arm-kernel, kvmarm
Hi Nathan,
> Hi Sudeep,
>
> On Fri, May 08, 2026 at 06:54:16PM +0100, Sudeep Holla wrote:
> > Move the FF-A core bring-up and teardown paths into platform driver
> > probe and remove callbacks, and register a synthetic arm-ffa platform
> > device to bind the driver.
> >
> > This makes the FF-A core lifetime follow the driver model while keeping
> > the device creation internal to the FF-A core. Use normal platform driver
> > registration so the probe path has standard driver-core semantics.
> >
> > The synthetic platform device is a temporary bridge until ACPI and
> > devicetree describe the FF-A core device or object. Once those firmware
> > description paths are defined, the internal platform device creation can
> > be dropped and the driver can bind to the firmware-described device
> > directly.
> >
> > Since the transport selection now happens from the platform probe path,
> > drop the __init annotation from ffa_transport_init().
> >
> > Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
>
> I am seeing
>
> arm-ffa arm-ffa: probe with driver arm-ffa failed with error -95
>
> on my two arm64 test machines after this change landed in -next as
> commit e659fc8e537c ("firmware: arm_ffa: Register core as a platform
> driver"), is this expected? If so, perhaps it should be silenced?
>
> Cheers,
> Nathan
>
Could you share the .config file you used for this?
Thanks!
[...]
--
Sincerely,
Yeoreum Yun
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver
[not found] ` <20260523050555.GA1121518@ax162>
@ 2026-05-23 6:27 ` Yeoreum Yun
0 siblings, 0 replies; 14+ messages in thread
From: Yeoreum Yun @ 2026-05-23 6:27 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Sudeep Holla, linux-security-module, linux-kernel,
linux-integrity, linux-arm-kernel, kvmarm
On Fri, May 22, 2026 at 10:05:55PM -0700, Nathan Chancellor wrote:
> On Sat, May 23, 2026 at 05:50:14AM +0100, Yeoreum Yun wrote:
> > Hi Nathan,
> >
> > > Hi Sudeep,
> > >
> > > On Fri, May 08, 2026 at 06:54:16PM +0100, Sudeep Holla wrote:
> > > > Move the FF-A core bring-up and teardown paths into platform driver
> > > > probe and remove callbacks, and register a synthetic arm-ffa platform
> > > > device to bind the driver.
> > > >
> > > > This makes the FF-A core lifetime follow the driver model while keeping
> > > > the device creation internal to the FF-A core. Use normal platform driver
> > > > registration so the probe path has standard driver-core semantics.
> > > >
> > > > The synthetic platform device is a temporary bridge until ACPI and
> > > > devicetree describe the FF-A core device or object. Once those firmware
> > > > description paths are defined, the internal platform device creation can
> > > > be dropped and the driver can bind to the firmware-described device
> > > > directly.
> > > >
> > > > Since the transport selection now happens from the platform probe path,
> > > > drop the __init annotation from ffa_transport_init().
> > > >
> > > > Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> > >
> > > I am seeing
> > >
> > > arm-ffa arm-ffa: probe with driver arm-ffa failed with error -95
> > >
> > > on my two arm64 test machines after this change landed in -next as
> > > commit e659fc8e537c ("firmware: arm_ffa: Register core as a platform
> > > driver"), is this expected? If so, perhaps it should be silenced?
> >
> > Could you share the .config file you used for this?
>
> Sure thing! It is attached. If you need anything else, please let me
> know.
Thanks! unless there was other error log from ff-a driver,
I think this happens because your environment either doesn’t
support FF-A or is using an SMCCC version earlier than 1.2 from
ffa_version_check() or ffa_transport_init().
If that’s the case, You can ignore this log since this behavior is
expected, and the dd core should print an error log.
Before this patch, the error was not shown because all FF-A initialization
was done during the initcall phase, and nothing was printed
even when the initcall function returned an error from caller of initcall.
[...]
--
Sincerely,
Yeoreum Yun
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-05-23 7:36 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 17:54 [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
2026-05-08 17:54 ` [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall" Sudeep Holla
2026-05-08 17:54 ` [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Sudeep Holla
2026-05-08 18:41 ` Yeoreum Yun
2026-05-23 0:11 ` Nathan Chancellor
2026-05-23 4:50 ` Yeoreum Yun
[not found] ` <20260523050555.GA1121518@ax162>
2026-05-23 6:27 ` Yeoreum Yun
2026-05-08 17:54 ` [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent Sudeep Holla
2026-05-08 18:42 ` Yeoreum Yun
2026-05-08 17:54 ` [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized Sudeep Holla
2026-05-08 18:45 ` Yeoreum Yun
2026-05-17 11:36 ` [PATCH 0/4] firmware: arm_ffa: Move core init to platform driver probe Sudeep Holla
2026-05-17 11:54 ` Sudeep Holla
2026-05-17 11:44 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox