Skip to content

Commit 4f1afea

Browse files
committed
Merge tag 'ffa-updates-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers
Arm FF-A updates for v6.15 This update primarily focuses on FF-A framework notification support along with other improvements, including UUID handling enhancements and various fixes. 1. FF-A framework notification upport - Adds support for multiple UUIDs per partition to register individual SRI callbacks. - Handles Rx buffer full framework notifications and provides a general interface for future extensions. 2. Improved multiple UUID/services per-partition handling - Adds support for UUID passing in FFA_MSG_SEND2, improving multiple UUID/service support in the driver. - Introduces a helper function to check whether a partition can receive REQUEST2 messages. 3. Partition handling generic improvements - Implements device unregistration for better partition cleanup. - Improves handling of the host partition presence in partition info. 4. FF-A version updates - Upgrades the driver version to FF-A v1.2. - Rejects major versions higher than the driver version as incompatible. 5. Big-Endian support fixes - Fixes big-endian issues in: __ffa_partition_info_regs_get() __ffa_partition_info_get() - Big-endian support is still incomplete, and only these changes can be verified without additional application/testing updates at the moment. We can discover all the partitions correctly with big-endian kernel now. 6. Miscellaneous fixes - Fixes function prototype misalignments in: sync_send_receive{,2} - Adds explicit type casting for return values from: FFA_VERSION and NOTIFICATION_INFO_GET - Corrects vCPU list parsing in ffa_notification_info_get(). 7. UUID management in the driver and DMA mask updates - Replaces UUID buffer with the standard UUID format in ffa_partition_info structure. - Fixes a typo in some FF-A bus macros. - Sets dma_mask for FF-A devices. In short, this update enhances notification handling, UUID support, and overall robustness of the FF-A driver while addressing multiple fixes and cleanups. * tag 'ffa-updates-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (23 commits) firmware: arm_ffa: Set dma_mask for ffa devices firmware: arm_ffa: Skip the first/partition ID when parsing vCPU list firmware: arm_ffa: Explicitly cast return value from NOTIFICATION_INFO_GET firmware: arm_ffa: Explicitly cast return value from FFA_VERSION before comparison firmware: arm_ffa: Handle ffa_notification_get correctly at virtual FF-A instance firmware: arm_ffa: Allow multiple UUIDs per partition to register SRI callback firmware: arm_ffa: Add support for handling framework notifications firmware: arm_ffa: Add support for {un,}registration of framework notifications firmware: arm_ffa: Stash ffa_device instead of notify_type in notifier_cb_info firmware: arm_ffa: Refactoring to prepare for framework notification support firmware: arm_ffa: Remove unnecessary declaration of ffa_partitions_cleanup() firmware: arm_ffa: Reject higher major version as incompatible firmware: arm_ffa: Upgrade FF-A version to v1.2 in the driver firmware: arm_ffa: Add support for passing UUID in FFA_MSG_SEND2 firmware: arm_ffa: Helper to check if a partition can receive REQUEST2 messages firmware: arm_ffa: Unregister the FF-A devices when cleaning up the partitions firmware: arm_ffa: Handle the presence of host partition in the partition info firmware: arm_ffa: Refactor addition of partition information into XArray firmware: arm_ffa: Fix big-endian support in __ffa_partition_info_regs_get() firmware: arm_ffa: Fix big-endian support in __ffa_partition_info_get() ... Link: https://lore.kernel.org/r/20250304105928.432997-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 698a56d + cc0aac7 commit 4f1afea

3 files changed

Lines changed: 422 additions & 146 deletions

File tree

drivers/firmware/arm_ffa/bus.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "common.h"
1717

18-
#define SCMI_UEVENT_MODALIAS_FMT "arm_ffa:%04x:%pUb"
18+
#define FFA_UEVENT_MODALIAS_FMT "arm_ffa:%04x:%pUb"
1919

2020
static DEFINE_IDA(ffa_bus_id);
2121

@@ -68,7 +68,7 @@ static int ffa_device_uevent(const struct device *dev, struct kobj_uevent_env *e
6868
{
6969
const struct ffa_device *ffa_dev = to_ffa_dev(dev);
7070

71-
return add_uevent_var(env, "MODALIAS=" SCMI_UEVENT_MODALIAS_FMT,
71+
return add_uevent_var(env, "MODALIAS=" FFA_UEVENT_MODALIAS_FMT,
7272
ffa_dev->vm_id, &ffa_dev->uuid);
7373
}
7474

@@ -77,7 +77,7 @@ static ssize_t modalias_show(struct device *dev,
7777
{
7878
struct ffa_device *ffa_dev = to_ffa_dev(dev);
7979

80-
return sysfs_emit(buf, SCMI_UEVENT_MODALIAS_FMT, ffa_dev->vm_id,
80+
return sysfs_emit(buf, FFA_UEVENT_MODALIAS_FMT, ffa_dev->vm_id,
8181
&ffa_dev->uuid);
8282
}
8383
static DEVICE_ATTR_RO(modalias);
@@ -160,11 +160,12 @@ static int __ffa_devices_unregister(struct device *dev, void *data)
160160
return 0;
161161
}
162162

163-
static void ffa_devices_unregister(void)
163+
void ffa_devices_unregister(void)
164164
{
165165
bus_for_each_dev(&ffa_bus_type, NULL, NULL,
166166
__ffa_devices_unregister);
167167
}
168+
EXPORT_SYMBOL_GPL(ffa_devices_unregister);
168169

169170
bool ffa_device_is_valid(struct ffa_device *ffa_dev)
170171
{
@@ -192,7 +193,6 @@ ffa_device_register(const struct ffa_partition_info *part_info,
192193
const struct ffa_ops *ops)
193194
{
194195
int id, ret;
195-
uuid_t uuid;
196196
struct device *dev;
197197
struct ffa_device *ffa_dev;
198198

@@ -212,14 +212,14 @@ ffa_device_register(const struct ffa_partition_info *part_info,
212212
dev = &ffa_dev->dev;
213213
dev->bus = &ffa_bus_type;
214214
dev->release = ffa_release_device;
215+
dev->dma_mask = &dev->coherent_dma_mask;
215216
dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
216217

217218
ffa_dev->id = id;
218219
ffa_dev->vm_id = part_info->id;
219220
ffa_dev->properties = part_info->properties;
220221
ffa_dev->ops = ops;
221-
import_uuid(&uuid, (u8 *)part_info->uuid);
222-
uuid_copy(&ffa_dev->uuid, &uuid);
222+
uuid_copy(&ffa_dev->uuid, &part_info->uuid);
223223

224224
ret = device_register(&ffa_dev->dev);
225225
if (ret) {

0 commit comments

Comments
 (0)