[PATCH] firmware: arm_ffa: fix ffa_notification_info_get()

Jens Wiklander jens.wiklander at linaro.org
Thu Mar 7 01:21:04 PST 2024


FFA_NOTIFICATION_INFO_GET retries information about pending
notifications. Notifications can be either global or per VCPU. Global
notifications are represented by the VM ID only, or 0 in the absence of
a hypervisor. ffa_notification_info_get() incorrectly expect no ID at all
for global notifications. Fix this by checking for 1 ID instead of 0.

Fixes: 3522be48d82b ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface")
Signed-off-by: Jens Wiklander <jens.wiklander at linaro.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 c183c7d39c0f..ff1f37a4b28c 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -790,7 +790,7 @@ static void ffa_notification_info_get(void)
 
 			part_id = packed_id_list[ids_processed++];
 
-			if (!ids_count[list]) { /* Global Notification */
+			if (ids_count[list] == 1) { /* Global Notification */
 				__do_sched_recv_cb(part_id, 0, false);
 				continue;
 			}
-- 
2.34.1




More information about the linux-arm-kernel mailing list