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

[PATCH v2 2/5] x86/mwait-idle: switch to using bool


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 20 Jan 2022 15:02:14 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=sIqEnurXfCEWFhZMdoHlOkaoI1CmFSGgajePTq0Qfsw=; b=ilrUll0zzybhPXH8f+FlgeD81ONCub+J1hKyjUfmlzPkJjKdwY4/zZZbKVKmFera2/0ntsmFlui2MEKYFbG9OeFRvS/ii/pGKdzNig3m9zgmzozDHVtBf5TazkTEo2b1PHOpjYqPhflU8zWpGh6K+LmshWiX89Y7z7yBJroRaRJiGHFzwVy/g24o89L5rWmigBUUaKyj0RJrWfp0qINdpZXK8XKulNQysGXyB6RrE5ghQdylguD2ccT8yDDsJs9c7eD/JIg4U6c98d8qEO1GquaYRXJbwNLwdcMohJeDhxq9QNPW6yPDtq7gv4ILBr36RC/ZNBPAVLWbJ9gE9uqfbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhqqiMfKMvP5JEbddtHnMpKpi7u7yULYVdr6pRptnTLqsPpQ9tmU2cOVs6uFOrk4vKOSQ2uOw40kPgB2sASGmXc846UPbAjB4mMCWIzJqPQ4+hjD6mCfH1o3l5QiSH92Ht8VEalPkjEhxHxOFihH5MI1FwGmaYHlGpCSs87dwbMWT+kIU6NilB4cekY9T2FdxKnI21SEfwz46aJvYJYLQMUPlCdWvdh50MzYfbRhDvCm5tBDqIMRWu9QjwdDugvwImDNm907MgevkBX9Rq1gDkUJ3xL9lb5SI8ESkXD+DP4bXHJ9fwawNnW1+Ayg0ppsOO4jSkp/2/LjGcR8JS7yig==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 20 Jan 2022 14:02:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When the driver was first ported, we didn't have "bool" yet, so
conversion to bool_t / 0 / 1 was necessary. Undo that conversion, easing
ports of newer changes as well as tidying things up.

Requested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.

--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -76,7 +76,7 @@
 # define pr_debug(fmt...)
 #endif
 
-static __initdata bool_t opt_mwait_idle = 1;
+static __initdata bool opt_mwait_idle = true;
 boolean_param("mwait-idle", opt_mwait_idle);
 
 static unsigned int mwait_substates;
@@ -93,8 +93,8 @@ struct idle_cpu {
         * Indicate which enable bits to clear here.
         */
        unsigned long auto_demotion_disable_flags;
-       bool_t byt_auto_demotion_disable_flag;
-       bool_t disable_promotion_to_c1e;
+       bool byt_auto_demotion_disable_flag;
+       bool disable_promotion_to_c1e;
 };
 
 static const struct idle_cpu *icpu;
@@ -867,7 +867,7 @@ static void c1e_promotion_disable(void *
 static const struct idle_cpu idle_cpu_nehalem = {
        .state_table = nehalem_cstates,
        .auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_atom = {
@@ -885,59 +885,59 @@ static const struct idle_cpu idle_cpu_li
 
 static const struct idle_cpu idle_cpu_snb = {
        .state_table = snb_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_byt = {
        .state_table = byt_cstates,
-       .disable_promotion_to_c1e = 1,
-       .byt_auto_demotion_disable_flag = 1,
+       .disable_promotion_to_c1e = true,
+       .byt_auto_demotion_disable_flag = true,
 };
 
 static const struct idle_cpu idle_cpu_cht = {
        .state_table = cht_cstates,
-       .disable_promotion_to_c1e = 1,
-       .byt_auto_demotion_disable_flag = 1,
+       .disable_promotion_to_c1e = true,
+       .byt_auto_demotion_disable_flag = true,
 };
 
 static const struct idle_cpu idle_cpu_ivb = {
        .state_table = ivb_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_ivt = {
        .state_table = ivt_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_hsw = {
        .state_table = hsw_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_bdw = {
        .state_table = bdw_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_skl = {
        .state_table = skl_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_skx = {
        .state_table = skx_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_icx = {
        .state_table = icx_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_avn = {
        .state_table = avn_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_knl = {
@@ -946,12 +946,12 @@ static const struct idle_cpu idle_cpu_kn
 
 static const struct idle_cpu idle_cpu_bxt = {
        .state_table = bxt_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 static const struct idle_cpu idle_cpu_dnv = {
        .state_table = dnv_cstates,
-       .disable_promotion_to_c1e = 1,
+       .disable_promotion_to_c1e = true,
 };
 
 #define ICPU(model, cpu) \




 


Rackspace

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