sched/topology: Move the declaration of 'schedutil_gov' to kernel/sched/sched.h
authorIngo Molnar <mingo@kernel.org>
Mon, 9 Oct 2023 15:31:26 +0000 (17:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 9 Oct 2023 15:33:10 +0000 (17:33 +0200)
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
kernel/sched/sched.h
kernel/sched/topology.c

index 7e7fedcfc580bbe14fec8d330156aa54c805ab45..faf9031422e1ca8a6073746c0051f60b784be095 100644 (file)
@@ -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
index 4cbbdacafe9e7067b2a9741e8d59b57befacaeb0..d9508617f7f8fba9c91320ac2c226475eef19e6c 100644 (file)
@@ -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;