summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-02-08 16:51:16 -0200
committerEduardo Habkost <ehabkost@redhat.com>2015-02-23 15:39:27 -0300
commite35704ba9ce0cd1e3c401f3bfbf3faf98b0b6885 (patch)
tree61653fc5b5ee23cda1226ac65fb9abf09cf92e9e /include/sysemu
parentcd2d5541271f1934345d8ca42f5fafff1744eee7 (diff)
downloadqemu-e35704ba9ce0cd1e3c401f3bfbf3faf98b0b6885.tar.gz
qemu-e35704ba9ce0cd1e3c401f3bfbf3faf98b0b6885.tar.bz2
qemu-e35704ba9ce0cd1e3c401f3bfbf3faf98b0b6885.zip
numa: Move NUMA declarations from sysemu.h to numa.h
Not all sysemu.h users need the NUMA declarations, and keeping them in a separate file makes it easier to see what are the interfaces provided by numa.c. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/numa.h28
-rw-r--r--include/sysemu/sysemu.h18
2 files changed, 28 insertions, 18 deletions
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
new file mode 100644
index 0000000000..514914f9a9
--- /dev/null
+++ b/include/sysemu/numa.h
@@ -0,0 +1,28 @@
+#ifndef SYSEMU_NUMA_H
+#define SYSEMU_NUMA_H
+
+#include <stdint.h>
+#include "qemu/bitmap.h"
+#include "qemu/option.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/hostmem.h"
+
+extern int nb_numa_nodes; /* Number of NUMA nodes */
+extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
+ * For all nodes, nodeid < max_numa_nodeid
+ */
+
+typedef struct node_info {
+ uint64_t node_mem;
+ DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
+ struct HostMemoryBackend *node_memdev;
+ bool present;
+} NodeInfo;
+extern NodeInfo numa_info[MAX_NODES];
+void set_numa_nodes(void);
+void set_numa_modes(void);
+void query_numa_node_mem(uint64_t node_mem[]);
+extern QemuOptsList qemu_numa_opts;
+int numa_init_func(QemuOpts *opts, void *opaque);
+
+#endif
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 748d0597f0..a72665919b 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -147,24 +147,6 @@ extern int mem_prealloc;
*/
#define MAX_CPUMASK_BITS 255
-extern int nb_numa_nodes; /* Number of NUMA nodes */
-extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
- * For all nodes, nodeid < max_numa_nodeid
- */
-
-typedef struct node_info {
- uint64_t node_mem;
- DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
- struct HostMemoryBackend *node_memdev;
- bool present;
-} NodeInfo;
-extern NodeInfo numa_info[MAX_NODES];
-void set_numa_nodes(void);
-void set_numa_modes(void);
-void query_numa_node_mem(uint64_t node_mem[]);
-extern QemuOptsList qemu_numa_opts;
-int numa_init_func(QemuOpts *opts, void *opaque);
-
#define MAX_OPTION_ROMS 16
typedef struct QEMUOptionRom {
const char *name;