xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Christoph Egger <chegger@amazon.de>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Don Slutz <dslutz@verizon.com>, Tim Deegan <tim@xen.org>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH 3/3] Adjust parse_vpmu_param use of parse_bool
Date: Mon, 28 Jul 2014 11:59:35 -0400	[thread overview]
Message-ID: <1406563175-23761-4-git-send-email-dslutz@verizon.com> (raw)
In-Reply-To: <1406563175-23761-1-git-send-email-dslutz@verizon.com>

Signed-off-by: Don Slutz <dslutz@verizon.com>
---
 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

      parent reply	other threads:[~2014-07-28 15:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 15:59 [PATCH 0/3] parse_bool fixes Don Slutz
2014-07-28 15:59 ` [PATCH 1/3] cmdline_parse: Also pass bool_assert to OPT_CUSTOM so that parse_bool can be used correctly Don Slutz
2014-07-28 16:06   ` Jan Beulich
2014-07-28 17:12     ` Don Slutz
2014-07-28 19:19       ` Keir Fraser
2014-07-28 20:30         ` Don Slutz
2014-07-29  6:35           ` Jan Beulich
2014-07-29 20:05             ` Don Slutz
2014-07-28 16:08   ` Andrew Cooper
2014-07-28 16:18     ` Don Slutz
2014-07-28 16:23       ` Andrew Cooper
2014-07-28 19:07         ` Don Slutz
2014-07-28 16:39       ` Jan Beulich
2014-07-28 15:59 ` [PATCH 2/3] xen/console: Better handing of console_timestamps as a boolean_param Don Slutz
2014-07-28 15:59 ` Don Slutz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406563175-23761-4-git-send-email-dslutz@verizon.com \
    --to=dslutz@verizon.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=chegger@amazon.de \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).