core_parking_helper() and get_cur_idle_nums() are only used for
XENPF_core_parking, so wrap them.
Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
---
cc: Andrew Cooper <andrew.cooper3@citrix.com>
cc: Anthony PERARD <anthony.perard@vates.tech>
cc: Michal Orzel <michal.orzel@amd.com>
cc: Jan Beulich <jbeulich@suse.com>
cc: Julien Grall <julien@xen.org>
cc: "Roger Pau Monné" <roger.pau@citrix.com>
cc: Stefano Stabellini <sstabellini@kernel.org>
---
xen/common/core_parking.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/common/core_parking.c b/xen/common/core_parking.c
index 7d6a18cdcf4c..2b763f83da93 100644
--- a/xen/common/core_parking.c
+++ b/xen/common/core_parking.c
@@ -170,6 +170,7 @@ static unsigned int cf_check core_parking_power(unsigned int event)
return cpu;
}
+#ifdef CONFIG_PLATFORM_OP
long cf_check core_parking_helper(void *data)
{
uint32_t idle_nums = (unsigned long)data;
@@ -213,6 +214,7 @@ long cf_check core_parking_helper(void *data)
return ret;
}
+#endif /* CONFIG_PLATFORM_OP */
bool core_parking_remove(unsigned int cpu)
{
@@ -237,10 +239,12 @@ bool core_parking_remove(unsigned int cpu)
return found;
}
+#ifdef CONFIG_PLATFORM_OP
uint32_t get_cur_idle_nums(void)
{
return cur_idle_nums;
}
+#endif /* CONFIG_PLATFORM_OP */
static const struct cp_policy __initconst_cf_clobber power_first = {
.name = "power",
--
2.34.1