summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2023-10-09 18:31:26 +0300
committerIngo Molnar <mingo@kernel.org>2023-10-09 18:33:10 +0300
commitf2273f4e19e29f7d0be6a2393f18369cd1b496c8 (patch)
tree247d910efc773255471a3ac1f9c1ce190b7a9712 /kernel/sched
parent8f833c82cdab7b4049bcfe88311d35fa5f24e422 (diff)
downloadlinux-f2273f4e19e29f7d0be6a2393f18369cd1b496c8.tar.xz
sched/topology: Move the declaration of 'schedutil_gov' to kernel/sched/sched.h
Move it out of the .c file into the shared scheduler-internal header file, to gain type-checking. Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Shrikanth Hegde <sshegde@linux.vnet.ibm.com> Cc: Valentin Schneider <vschneid@redhat.com> Link: https://lore.kernel.org/r/20231009060037.170765-3-sshegde@linux.vnet.ibm.com
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/sched.h2
-rw-r--r--kernel/sched/topology.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 7e7fedcfc580..faf9031422e1 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -3203,6 +3203,8 @@ static inline bool sched_energy_enabled(void)
return static_branch_unlikely(&sched_energy_present);
}
+extern struct cpufreq_governor schedutil_gov;
+
#else /* ! (CONFIG_ENERGY_MODEL && CONFIG_CPU_FREQ_GOV_SCHEDUTIL) */
#define perf_domain_span(pd) NULL
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 4cbbdacafe9e..d9508617f7f8 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -212,7 +212,6 @@ static unsigned int sysctl_sched_energy_aware = 1;
static DEFINE_MUTEX(sched_energy_mutex);
static bool sched_energy_update;
-extern struct cpufreq_governor schedutil_gov;
static bool sched_is_eas_possible(const struct cpumask *cpu_mask)
{
bool any_asym_capacity = false;