Skip to content

Commit 4ac3ff3

Browse files
committed
firmware: arm_ffa: Allow FF-A initialisation even when notification fails
JIRA: https://issues.redhat.com/browse/RHEL-102691 commit 95520fc Author: Sudeep Holla <sudeep.holla@arm.com> Date: Tue, 24 Oct 2023 11:56:17 +0100 FF-A notifications are optional feature in the specification. Currently we allow to continue if the firmware reports no support for the notifications. However, we fail to continue and complete the FF-A driver initialisation if the notification setup fails for any reason. Let us allow the FF-A driver to complete the initialisation even if the notification fails to setup. We will just flag the error and continue to provide other features in the driver. Link: https://lore.kernel.org/r/20231024-ffa-notification-fixes-v1-1-d552c0ec260d@arm.com Tested-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
1 parent eda5f5a commit 4ac3ff3

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,20 +1390,20 @@ static void ffa_notifications_cleanup(void)
13901390
}
13911391
}
13921392

1393-
static int ffa_notifications_setup(void)
1393+
static void ffa_notifications_setup(void)
13941394
{
13951395
int ret, irq;
13961396

13971397
ret = ffa_features(FFA_NOTIFICATION_BITMAP_CREATE, 0, NULL, NULL);
13981398
if (ret) {
1399-
pr_err("Notifications not supported, continuing with it ..\n");
1400-
return 0;
1399+
pr_info("Notifications not supported, continuing with it ..\n");
1400+
return;
14011401
}
14021402

14031403
ret = ffa_notification_bitmap_create();
14041404
if (ret) {
1405-
pr_err("notification_bitmap_create error %d\n", ret);
1406-
return ret;
1405+
pr_info("Notification bitmap create error %d\n", ret);
1406+
return;
14071407
}
14081408
drv_info->bitmap_created = true;
14091409

@@ -1426,10 +1426,10 @@ static int ffa_notifications_setup(void)
14261426
ret = ffa_sched_recv_cb_update(drv_info->vm_id, ffa_self_notif_handle,
14271427
drv_info, true);
14281428
if (!ret)
1429-
return ret;
1429+
return;
14301430
cleanup:
1431+
pr_info("Notification setup failed %d, not enabled\n", ret);
14311432
ffa_notifications_cleanup();
1432-
return ret;
14331433
}
14341434

14351435
static int __init ffa_init(void)
@@ -1487,13 +1487,9 @@ static int __init ffa_init(void)
14871487

14881488
ffa_set_up_mem_ops_native_flag();
14891489

1490-
ret = ffa_notifications_setup();
1491-
if (ret)
1492-
goto partitions_cleanup;
1490+
ffa_notifications_setup();
14931491

14941492
return 0;
1495-
partitions_cleanup:
1496-
ffa_partitions_cleanup();
14971493
free_pages:
14981494
if (drv_info->tx_buffer)
14991495
free_pages_exact(drv_info->tx_buffer, RXTX_BUFFER_SIZE);

0 commit comments

Comments
 (0)