diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2023-10-05 16:44:58 +0200 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-10-06 16:33:13 +0200 |
commit | 47561777d69400356aa5b3d4e14411eb9e5784ea (patch) | |
tree | de2b1c2cab507aaf778a06e65429eb2ea142959e /drivers | |
parent | firmware: arm_ffa: Implement the FFA_RUN interface (diff) | |
download | linux-47561777d69400356aa5b3d4e14411eb9e5784ea.tar.xz linux-47561777d69400356aa5b3d4e14411eb9e5784ea.zip |
firmware: arm_ffa: Implement the FFA_NOTIFICATION_SET interface
The framework provides an interface to the sender to specify the
notification to signal to the receiver. A sender signals a notification
by requesting its partition manager to set the corresponding bit in the
notifications bitmap of the receiver invoking FFA_NOTIFICATION_SET.
Implement the FFA_NOTIFICATION_SET to enable the caller(sender) to send
the notifications for any other partitions in the system.
Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-5-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/arm_ffa/driver.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index 82e54d231074..4edb3cb48014 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -616,6 +616,26 @@ static int ffa_notification_bind_common(u16 dst_id, u64 bitmap, return 0; } +static +int ffa_notification_set(u16 src_id, u16 dst_id, u32 flags, u64 bitmap) +{ + ffa_value_t ret; + u32 src_dst_ids = PACK_TARGET_INFO(dst_id, src_id); + + invoke_ffa_fn((ffa_value_t) { + .a0 = FFA_NOTIFICATION_SET, .a1 = src_dst_ids, .a2 = flags, + .a3 = NOTIFICATION_BITMAP_LOW(bitmap), + .a4 = NOTIFICATION_BITMAP_HIGH(bitmap), + }, &ret); + + if (ret.a0 == FFA_ERROR) + return ffa_to_linux_errno((int)ret.a2); + else if (ret.a0 != FFA_SUCCESS) + return -EINVAL; + + return 0; +} + static int ffa_run(struct ffa_device *dev, u16 vcpu) { ffa_value_t ret; |