Skip to content

Commit 666f6ec

Browse files
huangruirafaeljw
authored andcommitted
x86: Expose init_freq_invariance() to topology header
The function init_freq_invariance will be used on x86 CPPC, so expose it in the topology header. Signed-off-by: Huang Rui <ray.huang@amd.com> [ rjw: Subject adjustment ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 82d8936 commit 666f6ec

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

arch/x86/include/asm/topology.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,14 @@ extern void arch_scale_freq_tick(void);
215215
#define arch_scale_freq_tick arch_scale_freq_tick
216216

217217
extern void arch_set_max_freq_ratio(bool turbo_disabled);
218+
void init_freq_invariance(bool secondary, bool cppc_ready);
218219
#else
219220
static inline void arch_set_max_freq_ratio(bool turbo_disabled)
220221
{
221222
}
223+
static inline void init_freq_invariance(bool secondary, bool cppc_ready)
224+
{
225+
}
222226
#endif
223227

224228
#if defined(CONFIG_ACPI_CPPC_LIB) && defined(CONFIG_SMP)

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ static inline void smpboot_restore_warm_reset_vector(void)
155155
*((volatile u32 *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
156156
}
157157

158-
static void init_freq_invariance(bool secondary, bool cppc_ready);
159-
160158
/*
161159
* Report back to the Boot Processor during boot time or to the caller processor
162160
* during CPU online.
@@ -2125,7 +2123,7 @@ static void register_freq_invariance_syscore_ops(void)
21252123
static inline void register_freq_invariance_syscore_ops(void) {}
21262124
#endif
21272125

2128-
static void init_freq_invariance(bool secondary, bool cppc_ready)
2126+
void init_freq_invariance(bool secondary, bool cppc_ready)
21292127
{
21302128
bool ret = false;
21312129

@@ -2222,8 +2220,4 @@ void arch_scale_freq_tick(void)
22222220
pr_warn("Scheduler frequency invariance went wobbly, disabling!\n");
22232221
schedule_work(&disable_freq_invariance_work);
22242222
}
2225-
#else
2226-
static inline void init_freq_invariance(bool secondary, bool cppc_ready)
2227-
{
2228-
}
22292223
#endif /* CONFIG_X86_64 */

0 commit comments

Comments
 (0)