]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
driver: Factor out cell.h
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 9 Mar 2015 08:06:51 +0000 (09:06 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 20 Mar 2015 06:10:39 +0000 (07:10 +0100)
Another step towards multiple compilation modules for the driver: this
data structure will be used by most of them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
driver/cell.h [new file with mode: 0644]
driver/main.c

diff --git a/driver/cell.h b/driver/cell.h
new file mode 100644 (file)
index 0000000..0d78089
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2014-2015
+ *
+ * Authors:
+ *  Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ */
+
+#ifndef _JAILHOUSE_DRIVER_CELL_H
+#define _JAILHOUSE_DRIVER_CELL_H
+
+#include <linux/cpumask.h>
+#include <linux/list.h>
+#include <linux/kobject.h>
+
+#include <jailhouse/cell-config.h>
+
+struct cell {
+       struct kobject kobj;
+       struct list_head entry;
+       unsigned int id;
+       cpumask_t cpus_assigned;
+       u32 num_memory_regions;
+       u32 num_pci_devices;
+       struct jailhouse_memory *memory_regions;
+       struct jailhouse_pci_device *pci_devices;
+};
+
+#endif /* !_JAILHOUSE_DRIVER_CELL_H */
index cad41bf735aa620fbc2f8eedee5b9279fd04d2b5..8b377d1b32c35c13f4c742f543876ab48892b3c6 100644 (file)
@@ -31,8 +31,9 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 
+#include "cell.h"
 #include "jailhouse.h"
-#include <jailhouse/cell-config.h>
+
 #include <jailhouse/header.h>
 #include <jailhouse/hypercall.h>
 #include <generated/version.h>
@@ -93,17 +94,6 @@ static const struct sysfs_ops cell_sysfs_ops = {
 #define JAILHOUSE_FW_NAME      "jailhouse.bin"
 #endif
 
-struct cell {
-       struct kobject kobj;
-       struct list_head entry;
-       unsigned int id;
-       cpumask_t cpus_assigned;
-       u32 num_memory_regions;
-       u32 num_pci_devices;
-       struct jailhouse_memory *memory_regions;
-       struct jailhouse_pci_device *pci_devices;
-};
-
 MODULE_DESCRIPTION("Management driver for Jailhouse partitioning hypervisor");
 MODULE_LICENSE("GPL");
 #ifdef CONFIG_X86