From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] x86/ats: Fix parsing of 'ats' command line option Date: Thu, 31 Oct 2013 11:46:48 +0000 Message-ID: <1383220008-18790-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org This is really a boolean_param() hidden inside a hand-coded attempt to replicate boolean_param(), which misses the 'no-' prefix semantics expected with Xen boolean parameters. Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich --- xen/drivers/passthrough/x86/ats.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/xen/drivers/passthrough/x86/ats.c b/xen/drivers/passthrough/x86/ats.c index 674b54a..bb7ee9a 100644 --- a/xen/drivers/passthrough/x86/ats.c +++ b/xen/drivers/passthrough/x86/ats.c @@ -20,33 +20,8 @@ LIST_HEAD(ats_devices); -static void parse_ats_param(char *s); -custom_param("ats", parse_ats_param); - bool_t __read_mostly ats_enabled = 1; - -static void __init parse_ats_param(char *s) -{ - char *ss; - - do { - ss = strchr(s, ','); - if ( ss ) - *ss = '\0'; - - switch ( parse_bool(s) ) - { - case 0: - ats_enabled = 0; - break; - case 1: - ats_enabled = 1; - break; - } - - s = ss + 1; - } while ( ss ); -} +boolean_param("ats", ats_enabled); int enable_ats_device(int seg, int bus, int devfn) { -- 1.7.10.4