Skip to contentSkip to conversation

x86/ats: Fix parsing of 'ats' command line option

PATCH New Andrew Cooper 1 participant 1 message Oct 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/ats: Fix parsing of 'ats' command line option

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.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
---
 xen/drivers/passthrough/x86/ats.c |   27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)
xen/drivers/passthrough/x86/ats.c +1 -26
index 674b54a..bb7ee9a 100644
@@ -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)
 {
Signature · 1 line
1.7.10.4