|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 13/21] xen/arm: Introduce dom0_nodes boot command option
Allow ARM Xen to accept the 'dom0_nodes' command line option.
The syntax and format of the parameters are identical to the x86
implementation. The logic that actually functions based on this
argument will be provided in a follow-up patch.
---
xen/arch/arm/domain_build.c | 43 +++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 1efddc60ef..f4187512b0 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -37,6 +37,7 @@
#include <asm/cpufeature.h>
#include <asm/domain_build.h>
#include <xen/event.h>
+#include <xen/ctype.h>
#include <xen/irq.h>
#include <xen/grant_table.h>
@@ -66,6 +67,48 @@ static int __init parse_dom0_mem(const char *s)
}
custom_param("dom0_mem", parse_dom0_mem);
+static nodemask_t __initdata dom0_nodes;
+bool __initdata dom0_affinity_relaxed;
+
+#ifdef CONFIG_NUMA
+
+static int __init cf_check parse_dom0_nodes(const char *s)
+{
+ const char *ss;
+ int rc = 0;
+ unsigned int nid;
+
+ do {
+ ss = strchr(s, ',');
+ if ( !ss )
+ ss = strchr(s, '\0');
+
+ if ( isdigit(*s) )
+ {
+ const char *endp;
+
+ if ( (nid = simple_strtoul(s, &endp, 0), endp != ss) )
+ rc = -EINVAL;
+ else if ( nid >= MAX_NUMNODES )
+ rc = -E2BIG;
+ else
+ node_set(nid, dom0_nodes);
+ }
+ else if ( !cmdline_strcmp(s, "relaxed") )
+ dom0_affinity_relaxed = true;
+ else if ( !cmdline_strcmp(s, "strict") )
+ dom0_affinity_relaxed = false;
+ else
+ rc = -EINVAL;
+
+ s = ss + 1;
+ } while ( *ss );
+
+ return rc;
+}
+custom_param("dom0_nodes", parse_dom0_nodes);
+#endif /* CONFIG_NUMA */
+
int __init parse_arch_dom0_param(const char *s, const char *e)
{
long long val;
--
2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |