x86/ats: Fix parsing of 'ats' command line option
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 4 Nov 2013 13:45:17 +0000 (14:45 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Nov 2013 13:45:17 +0000 (14:45 +0100)
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 <andrew.cooper3@citrix.com>
xen/drivers/passthrough/x86/ats.c

index 674b54a4f6cdbdbd2c4e258c1f168e0df2e44a7f..bb7ee9ab68f0a844d70b6d673cf80511f630aea2 100644 (file)
 
 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)
 {