lkml.org 
[lkml]   [2019]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization
Date
From: Li Guanglei <guanglei.li@unisoc.com>

uclamp_rq for each clamp id(UCLAMP_CNT) should be initialized when call
init_uclamp.

Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
---
kernel/sched/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 44123b4..05f870b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1252,7 +1252,8 @@ static void __init init_uclamp(void)
mutex_init(&uclamp_mutex);

for_each_possible_cpu(cpu) {
- memset(&cpu_rq(cpu)->uclamp, 0, sizeof(struct uclamp_rq));
+ memset(&cpu_rq(cpu)->uclamp, 0,
+ sizeof(struct uclamp_rq)*UCLAMP_CNT);
cpu_rq(cpu)->uclamp_flags = 0;
}

--
2.7.4
\
 
 \ /
  Last update: 2019-12-25 08:45    [W:0.041 / U:5.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site