From: Sudeep Holla Date: Mon, 17 Feb 2025 15:38:50 +0000 (+0000) Subject: firmware: arm_ffa: Helper to check if a partition can receive REQUEST2 messages X-Git-Tag: v6.15-rc1~158^2~14^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84968e32d301f80bd37fa8d4f370528b714bdc2f;p=thirdparty%2Fkernel%2Flinux.git firmware: arm_ffa: Helper to check if a partition can receive REQUEST2 messages Add a helper that allows FF-A drivers to check if the partition can receive the direct requests via the FFA_MSG_SEND_DIRECT_REQ2 ABI. Tested-by: Viresh Kumar Message-Id: <20250217-ffa_updates-v3-9-bd1d9de615e7@arm.com> Signed-off-by: Sudeep Holla --- diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index ca2ad5b0ac430..761ea8fe3bb60 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -240,6 +240,10 @@ struct ffa_partition_info { #define FFA_PARTITION_NOTIFICATION_RECV BIT(3) /* partition runs in the AArch64 execution state. */ #define FFA_PARTITION_AARCH64_EXEC BIT(8) +/* partition supports receipt of direct request2 */ +#define FFA_PARTITION_DIRECT_REQ2_RECV BIT(9) +/* partition can send direct request2. */ +#define FFA_PARTITION_DIRECT_REQ2_SEND BIT(10) u32 properties; uuid_t uuid; }; @@ -259,6 +263,10 @@ bool ffa_partition_check_property(struct ffa_device *dev, u32 property) #define ffa_partition_supports_direct_recv(dev) \ ffa_partition_check_property(dev, FFA_PARTITION_DIRECT_RECV) +#define ffa_partition_supports_direct_req2_recv(dev) \ + (ffa_partition_check_property(dev, FFA_PARTITION_DIRECT_REQ2_RECV) && \ + !dev->mode_32bit) + /* For use with FFA_MSG_SEND_DIRECT_{REQ,RESP} which pass data via registers */ struct ffa_send_direct_data { unsigned long data0; /* w3/x3 */