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

[Xen-devel] [PATCH 3/3] Adjust parse_vpmu_param use of parse_bool



Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx>
---
 xen/arch/x86/hvm/vpmu.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c
index e02edcf..fb99748 100644
--- a/xen/arch/x86/hvm/vpmu.c
+++ b/xen/arch/x86/hvm/vpmu.c
@@ -48,6 +48,13 @@ static void __init parse_vpmu_param(char *s, int bool_assert)
     switch ( parse_bool(s) )
     {
     case 0:
+        bool_assert = !bool_assert;
+        /* fall through */
+    case 1:
+        if ( bool_assert )
+            opt_vpmu_enabled |= VPMU_BOOT_ENABLED;
+       else
+            opt_vpmu_enabled &= ~VPMU_BOOT_ENABLED;
         break;
     default:
         if ( !strcmp(s, "bts") )
@@ -57,9 +64,10 @@ static void __init parse_vpmu_param(char *s, int bool_assert)
             printk("VPMU: unknown flag: %s - vpmu disabled!\n", s);
             break;
         }
-        /* fall through */
-    case 1:
-        opt_vpmu_enabled |= VPMU_BOOT_ENABLED;
+        if ( bool_assert )
+            opt_vpmu_enabled |= VPMU_BOOT_ENABLED;
+       else
+            opt_vpmu_enabled &= ~VPMU_BOOT_ENABLED;
         break;
     }
 }
-- 
1.8.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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