diff --git a/kernel/sched/walt.c b/kernel/sched/walt.c index 6a08d2993c9a..fbf12f07b4dc 100644 --- a/kernel/sched/walt.c +++ b/kernel/sched/walt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -3371,9 +3371,12 @@ static void walt_init_once(void) void walt_sched_init_rq(struct rq *rq) { int j; + static bool init; - if (cpu_of(rq) == 0) + if (!init) { walt_init_once(); + init = true; + } cpumask_set_cpu(cpu_of(rq), &rq->freq_domain_cpumask);