summaryrefslogtreecommitdiff
path: root/unscrew-ck1.patch
blob: 67e87c85c8f091697458c53db94d0ddd9860058b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 0b69e633d6b0b08ae8547dc4099c8c0985019553 Mon Sep 17 00:00:00 2001
From: Con Kolivas <kernel@kolivas.org>
Date: Thu, 11 Jun 2020 21:48:56 +1000
Subject: [PATCH] Fix cpufreq_cooling build.

---
 kernel/sched/MuQSS.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c
index 18a9b4a23e44e..c55c158e8b8e4 100644
--- a/kernel/sched/MuQSS.c
+++ b/kernel/sched/MuQSS.c
@@ -3246,6 +3246,17 @@ static inline u64 do_task_delta_exec(struct task_struct *p, struct rq *rq)
 	return ns;
 }
 
+DEFINE_PER_CPU(unsigned long, thermal_pressure);
+
+void arch_set_thermal_pressure(struct cpumask *cpus,
+			       unsigned long th_pressure)
+{
+	int cpu;
+
+	for_each_cpu(cpu, cpus)
+		WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
+}
+
 /*
  * Return accounted runtime for the task.
  * Return separately the current's pending runtime that have not been