[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220214101450.356047-4-ray.huang@amd.com>
Date: Mon, 14 Feb 2022 18:14:49 +0800
From: Huang Rui <ray.huang@....com>
To: Borislav Petkov <bp@...en8.de>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
<linux-pm@...r.kernel.org>, <linux-acpi@...r.kernel.org>,
<x86@...nel.org>
CC: <linux-kernel@...r.kernel.org>,
Randy Dunlap <rdunlap@...radead.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Giovanni Gherdovich <ggherdovich@...e.cz>,
Alex Deucher <alexander.deucher@....com>,
"Deepak Sharma" <deepak.sharma@....com>,
Jinzhou Su <Jinzhou.Su@....com>,
Perry Yuan <Perry.Yuan@....com>,
Jassmine Meng <li.meng@....com>, Huang Rui <ray.huang@....com>
Subject: [PATCH 3/4] x86, sched: 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@....com>
---
arch/x86/include/asm/topology.h | 4 ++++
arch/x86/kernel/smpboot.c | 8 +-------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 168ade7d4007..c35005a03768 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -215,10 +215,14 @@ extern void arch_scale_freq_tick(void);
#define arch_scale_freq_tick arch_scale_freq_tick
extern void arch_set_max_freq_ratio(bool turbo_disabled);
+void init_freq_invariance(bool secondary, bool cppc_ready);
#else
static inline void arch_set_max_freq_ratio(bool turbo_disabled)
{
}
+static inline void init_freq_invariance(bool secondary, bool cppc_ready)
+{
+}
#endif
#if defined(CONFIG_ACPI_CPPC_LIB) && defined(CONFIG_SMP)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 0718cc7649a4..8f2ff9be0fcc 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -155,8 +155,6 @@ static inline void smpboot_restore_warm_reset_vector(void)
*((volatile u32 *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
}
-static void init_freq_invariance(bool secondary, bool cppc_ready);
-
/*
* Report back to the Boot Processor during boot time or to the caller processor
* during CPU online.
@@ -2125,7 +2123,7 @@ static void register_freq_invariance_syscore_ops(void)
static inline void register_freq_invariance_syscore_ops(void) {}
#endif
-static void init_freq_invariance(bool secondary, bool cppc_ready)
+void init_freq_invariance(bool secondary, bool cppc_ready)
{
bool ret = false;
@@ -2222,8 +2220,4 @@ void arch_scale_freq_tick(void)
pr_warn("Scheduler frequency invariance went wobbly, disabling!\n");
schedule_work(&disable_freq_invariance_work);
}
-#else
-static inline void init_freq_invariance(bool secondary, bool cppc_ready)
-{
-}
#endif /* CONFIG_X86_64 */
--
2.25.1
Powered by blists - more mailing lists