Skip to contentSkip to conversation

firmware: arm_ffa: fix ffa_notification_info_get()

PATCH Applied Jens Wiklander 2 participants 3 messages Mar 11, 2024 – Mar 26, 2024 Firmware framework for ARMV8-a

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 firmware: arm_ffa: fix ffa_notification_info_get()

FFA_NOTIFICATION_INFO_GET retrieves information about pending notifications. Notifications can be either global or per VCPU. Global notifications are reported with the partition ID only in the list of endpoints with pending notifications. 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")
---
 drivers/firmware/arm_ffa/driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/arm_ffa/driver.c +1 -1
index f2556a8e9401..9bc2e10381af 100644
@@ -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;
 			}
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Jens Wiklander

FFA_NOTIFICATION_INFO_GET retrieves information about pending notifications. Notifications can be either global or per VCPU. Global notifications are reported with the partition ID only in the list of endpoints with pending notifications. ffa_notification_info_get() incorrectly expect no ID at all for global notifications. Fix this by checking for 1 ID instead of 0.

LGTM, will queue it at -rc1 as fix.

--
Regards,
Sudeep

Applied
#2 lore raw
In reply to Jens Wiklander
Quoted 8 lines · Jens Wiklander

FFA_NOTIFICATION_INFO_GET retrieves information about pending notifications. Notifications can be either global or per VCPU. Global notifications are reported with the partition ID only in the list of endpoints with pending notifications. ffa_notification_info_get() incorrectly expect no ID at all for global notifications. Fix this by checking for 1 ID instead of 0.

[...]

Applied to sudeep.holla/linux (for-next/ffa/fixes), thanks!

[1/1] firmware: arm_ffa: fix ffa_notification_info_get()

      https://git.kernel.org/sudeep.holla/c/1a4bd2b128fb

--
Regards,
Sudeep