Skip to content

Commit e4c8e18

Browse files
committed
init: add a check for userspace schedulers
When running the LL scheduler in userspace, it can happen that no kernel-mode schedulers get registered on a running secondary core. To recognise such cases add a check for userspace schedulers to check_restore(). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 6590ef5 commit e4c8e18

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/init/init.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ static bool check_restore(void)
9494
{
9595
struct idc *idc = *idc_get();
9696
struct notify *notifier = *arch_notify_get();
97-
struct schedulers *schedulers = *arch_schedulers_get();
97+
struct schedulers **schedulers = arch_schedulers_get();
98+
struct schedulers **user_schedulers = arch_user_schedulers_get();
9899

99100
/* check whether basic core structures has been already allocated. If they
100101
* are available in memory, it means that this is not cold boot and memory
101102
* has not been powered off.
102103
*/
103-
return !!idc && !!notifier && !!schedulers;
104+
return !!idc && !!notifier &&
105+
((schedulers && *schedulers) || (user_schedulers && *user_schedulers));
104106
}
105107

106108
static inline int secondary_core_restore(void) { return 0; };

0 commit comments

Comments
 (0)