From ec2e3c8ca994ccd32ab2d9dbe3aa009407eafdf7 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Thu, 5 Mar 2020 13:21:16 +0530 Subject: [PATCH] sched/walt: Improve the scheduler This change is for general scheduler improvement. Change-Id: Iace6101277bfc14527d588e56d2a90371ef13ad8 Signed-off-by: Pavankumar Kondeti --- kernel/sched/walt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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);