[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/11] xen/platform_op: Wrap around XENPF_core_parking


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 25 Jul 2025 14:15:29 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7TL2qoxruEqT6O3jCVVSBwjF4BhlpagaCPV+ejCwsrk=; b=NXatpqlkyAPwvNnM1DVUDsIxJYETvpuzE3Ne4xEcIOwcHzlthrt+tGQhrLru4BmgRgCCknXew7RyRMxle/e0DVFmQWT7xFFwVkn5/HzkP331DZj4QhPZs9S6eRsP+dOsxC2UBZr2BwSt2OI5GLm/yeMXoL8VUrRYV7y2nedeUrxbbTcOeLgh7m+0HIpPfPi0vQDvjVWGcFDagAXE9goU3WKz26vU54SPGal22xDXblhNsgY5BsK0sogjc+eZiprzW1tvcYjluVzw2qz6/y06TBJRXF4CRtTT0fqmUe1I2gpfsKsOJ4yQjrCJI2AIDVZrnjgbjLUoVkbB4KqcQAbVlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j/inWyrvDTqw2wjQrY+011EKmj9W/4nIDuv9CBRO4E2/+hp5ZDuIHAlctwVvktLOXZY9hM1FXKcORkKCnI0hFH2nnoNMiK9Mg9TW3XxlmvG+dsQY7InZ5z0fN8W6pcBtdbincczLUIRRIxGWFLXfQENBea2s/w2WzVR2oZdgKxcA2TCwDe6ZDJFt7ddbQdsF4JfRi9IgrpgL2nfAg9Ij3/NrXmwyDOlW6xF0zr0CpswGiJBf1R8uSthPSaf1bqAZIM/NpaGbIh16efeC0wlIowR1m8yMKl81zitn/2si8kNZr7cUPkLDV4SiTTO/YHLyF2A5zG5/vimEsUrwWvvQQw==
  • Cc: Huang Rui <ray.huang@xxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 25 Jul 2025 06:21:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxx>
---
cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
cc: Michal Orzel <michal.orzel@xxxxxxx>
cc: Jan Beulich <jbeulich@xxxxxxxx>
cc: Julien Grall <julien@xxxxxxx>
cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.