Skip to content

Commit 1ff2fb9

Browse files
committed
x86/aperfperf: Make it correct on 32bit and UP kernels
The utilization of arch_scale_freq_tick() for CPU frequency readouts is incomplete as it failed to move the function prototype and the define out of the CONFIG_SMP && CONFIG_X86_64 #ifdef. Make them unconditionally available. Fixes: bb6e89d ("x86/aperfmperf: Make parts of the frequency invariance code unconditional") Reported-by: kernel test robot <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]
1 parent fb4c77c commit 1ff2fb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/include/asm/topology.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,16 @@ static inline long arch_scale_freq_capacity(int cpu)
212212
}
213213
#define arch_scale_freq_capacity arch_scale_freq_capacity
214214

215-
extern void arch_scale_freq_tick(void);
216-
#define arch_scale_freq_tick arch_scale_freq_tick
217-
218215
extern void arch_set_max_freq_ratio(bool turbo_disabled);
219216
extern void freq_invariance_set_perf_ratio(u64 ratio, bool turbo_disabled);
220217
#else
221218
static inline void arch_set_max_freq_ratio(bool turbo_disabled) { }
222219
static inline void freq_invariance_set_perf_ratio(u64 ratio, bool turbo_disabled) { }
223220
#endif
224221

222+
extern void arch_scale_freq_tick(void);
223+
#define arch_scale_freq_tick arch_scale_freq_tick
224+
225225
#ifdef CONFIG_ACPI_CPPC_LIB
226226
void init_freq_invariance_cppc(void);
227227
#define arch_init_invariance_cppc init_freq_invariance_cppc

0 commit comments

Comments
 (0)