From 1d14a4d9cef9c8cea3635abf858524f90b50deb6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 12 Oct 2023 15:05:43 +0000 Subject: [PATCH] ANDROID: GKI: sched: put back the cpu_capacity_inverted variable In commit 8517d739923e ("sched/fair: Remove capacity inversion detection"), the cpu_capacity_inverted was removed from struct rq. Add it back to preserve the abi and comment that it's not valid anymore. Note, due to external modules using internal structures like this, it's going to be "tricky" for them to even notice this has changed. Their build systems are going to have "fun" with this... Bug: 161946584 Fixes: 8517d739923e ("sched/fair: Remove capacity inversion detection") Change-Id: I2b41b3ba2eb23fbb33ff872915a5e481640d0cc4 Signed-off-by: Greg Kroah-Hartman --- kernel/sched/sched.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8a42a3c36f6d..210032735650 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1061,6 +1061,15 @@ struct rq { unsigned long cpu_capacity; unsigned long cpu_capacity_orig; + /* + * ANDROID ONLY: + * cpu_capacity_inverted is preserved here to keep the same ABI, + * but it is NOT a field that is used anymore. Be aware of this + * if when attempting to access it in out-of-tree code. It was + * removed in commit 8517d739923e ("sched/fair: Remove capacity + * inversion detection") in the 6.1.47 upstream release. + */ + unsigned long cpu_capacity_inverted; struct balance_callback *balance_callback;