Skip to content

Commit

Permalink
core: arm: call call_driver_initcalls() late
Browse files Browse the repository at this point in the history
Calls call_early_initcalls() and call_service_initcalls() directly
instead of call_initcalls() from init_tee_runtime(). This allows
call_driver_initcalls() to be called with PAUTH enabled.

Signed-off-by: Jens Wiklander <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
  • Loading branch information
jenswi-linaro authored and jforissier committed Aug 22, 2024
1 parent 420f112 commit 11d8578
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/arch/arm/kernel/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ void init_tee_runtime(void)
*/
if (!IS_ENABLED(CFG_NS_VIRTUALIZATION))
call_preinitcalls();
call_initcalls();
call_early_initcalls();
call_service_initcalls();

/*
* These two functions uses crypto_rng_read() to initialize the
Expand Down Expand Up @@ -1075,6 +1076,8 @@ void __weak boot_init_primary_late(unsigned long fdt __unused,
*/
void __weak boot_init_primary_final(void)
{
if (!IS_ENABLED(CFG_NS_VIRTUALIZATION))
call_driver_initcalls();
call_finalcalls();
IMSG("Primary CPU switching to normal world boot");
}
Expand Down
1 change: 1 addition & 0 deletions core/arch/arm/kernel/virtualization.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ void virt_on_stdcall(void)
mutex_lock(&prtn->mutex);
if (!prtn->runtime_initialized) {
init_tee_runtime();
call_driver_initcalls();
prtn->runtime_initialized = true;
}
mutex_unlock(&prtn->mutex);
Expand Down

0 comments on commit 11d8578

Please sign in to comment.