This attribute name confused me at some code lines, like:
root_cell.config = &system_config->root_cell;
Why assigned the root_cell to the root_cell.config?
Use the root_cell_config better,
root_cell.config = &system_config->root_cell_config;
Others are similar.
Signed-off-by: Xuguo Wang <[email protected]>
---
configs/bananapi.c | 2 +-
configs/f2a88xm-hd3.c | 2 +-
configs/h87i.c | 2 +-
configs/imb-a180.c | 2 +-
configs/jetson-tk1.c | 2 +-
configs/qemu-vm.c | 2 +-
configs/vexpress.c | 2 +-
driver/main.c | 8 ++++----
hypervisor/control.c | 4 ++--
hypervisor/include/jailhouse/cell-config.h | 6 +++---
hypervisor/setup.c | 2 +-
11 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/configs/bananapi.c b/configs/bananapi.c
index d81668e..3fd4178 100644
--- a/configs/bananapi.c
+++ b/configs/bananapi.c
@@ -34,7 +34,7 @@ struct {
.size = 0x1000,
.flags = JAILHOUSE_MEM_IO,
},
- .root_cell = {
+ .root_cell_config = {
.name = "Banana-Pi",
.cpu_set_size = sizeof(config.cpus),
diff --git a/configs/f2a88xm-hd3.c b/configs/f2a88xm-hd3.c
index a0be03f..7a7dd27 100644
--- a/configs/f2a88xm-hd3.c
+++ b/configs/f2a88xm-hd3.c
@@ -56,7 +56,7 @@ struct {
},
},
.interrupt_limit = 256,
- .root_cell = {
+ .root_cell_config = {
.name = "F2A88XM-HD3",
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
diff --git a/configs/h87i.c b/configs/h87i.c
index 5869fb1..116718c 100644
--- a/configs/h87i.c
+++ b/configs/h87i.c
@@ -51,7 +51,7 @@ struct {
},
},
.interrupt_limit = 256,
- .root_cell = {
+ .root_cell_config = {
.name = "H87I-PLUS",
.cpu_set_size = sizeof(config.cpus),
diff --git a/configs/imb-a180.c b/configs/imb-a180.c
index 45d7ca5..7ce2db6 100644
--- a/configs/imb-a180.c
+++ b/configs/imb-a180.c
@@ -44,7 +44,7 @@ struct {
.mmconfig_end_bus = 0xff,
.pm_timer_address = 0x808,
},
- .root_cell = {
+ .root_cell_config = {
.name = "IMB-A180",
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
diff --git a/configs/jetson-tk1.c b/configs/jetson-tk1.c
index b2b2a0f..5166726 100644
--- a/configs/jetson-tk1.c
+++ b/configs/jetson-tk1.c
@@ -37,7 +37,7 @@ struct {
.size = 0x1000,
.flags = JAILHOUSE_MEM_IO,
},
- .root_cell = {
+ .root_cell_config = {
.name = "Jetson-TK1",
.cpu_set_size = sizeof(config.cpus),
diff --git a/configs/qemu-vm.c b/configs/qemu-vm.c
index a69672e..e220ab0 100644
--- a/configs/qemu-vm.c
+++ b/configs/qemu-vm.c
@@ -61,7 +61,7 @@ struct {
},
},
.interrupt_limit = 256,
- .root_cell = {
+ .root_cell_config = {
.name = "QEMU-VM",
.cpu_set_size = sizeof(config.cpus),
diff --git a/configs/vexpress.c b/configs/vexpress.c
index 6a9b021..423d9c2 100644
--- a/configs/vexpress.c
+++ b/configs/vexpress.c
@@ -32,7 +32,7 @@ struct {
.size = 0x1000,
.flags = JAILHOUSE_MEM_IO,
},
- .root_cell = {
+ .root_cell_config = {
.name = "VExpress Linux",
.cpu_set_size = sizeof(config.cpus),
diff --git a/driver/main.c b/driver/main.c
index 39ab794..66e8879 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -94,7 +94,7 @@ static long get_max_cpus(u32 cpu_set_size,
u8 __user *cpu_set =
(u8 __user *)jailhouse_cell_cpu_set(
(const struct jailhouse_cell_desc * __force)
- &system_config->root_cell);
+ &system_config->root_cell_config);
unsigned int pos = cpu_set_size;
long max_cpu_id;
u8 bitmap;
@@ -199,9 +199,9 @@ static int jailhouse_cmd_enable(struct jailhouse_system
__user *arg)
return -EINVAL;
}
- config_header.root_cell.name[JAILHOUSE_CELL_NAME_MAXLEN] = 0;
+ config_header.root_cell_config.name[JAILHOUSE_CELL_NAME_MAXLEN] = 0;
- max_cpus = get_max_cpus(config_header.root_cell.cpu_set_size, arg);
+ max_cpus = get_max_cpus(config_header.root_cell_config.cpu_set_size,
arg);
if (max_cpus < 0)
return max_cpus;
if (max_cpus > UINT_MAX)
@@ -272,7 +272,7 @@ static int jailhouse_cmd_enable(struct jailhouse_system
__user *arg)
header->debug_console_base = (void * __force)console;
}
- err = jailhouse_cell_prepare_root(&config->root_cell);
+ err = jailhouse_cell_prepare_root(&config->root_cell_config);
if (err)
goto error_unmap;
diff --git a/hypervisor/control.c b/hypervisor/control.c
index 94ed6c6..b5c8a5b 100644
--- a/hypervisor/control.c
+++ b/hypervisor/control.c
@@ -63,9 +63,9 @@ unsigned int next_cpu(unsigned int cpu, struct cpu_set
*cpu_set, int exception)
bool cpu_id_valid(unsigned long cpu_id)
{
const unsigned long *system_cpu_set =
- jailhouse_cell_cpu_set(&system_config->root_cell);
+ jailhouse_cell_cpu_set(&system_config->root_cell_config);
- return (cpu_id < system_config->root_cell.cpu_set_size * 8 &&
+ return (cpu_id < system_config->root_cell_config.cpu_set_size * 8 &&
test_bit(cpu_id, system_cpu_set));
}
diff --git a/hypervisor/include/jailhouse/cell-config.h
b/hypervisor/include/jailhouse/cell-config.h
index 300f3da..09932ef 100644
--- a/hypervisor/include/jailhouse/cell-config.h
+++ b/hypervisor/include/jailhouse/cell-config.h
@@ -165,7 +165,7 @@ struct jailhouse_system {
} __attribute__((packed)) x86;
} __attribute__((packed)) platform_info;
__u32 interrupt_limit;
- struct jailhouse_cell_desc root_cell;
+ struct jailhouse_cell_desc root_cell_config;
} __attribute__((packed));
static inline __u32
@@ -184,8 +184,8 @@ jailhouse_cell_config_size(struct jailhouse_cell_desc *cell)
static inline __u32
jailhouse_system_config_size(struct jailhouse_system *system)
{
- return sizeof(*system) - sizeof(system->root_cell) +
- jailhouse_cell_config_size(&system->root_cell);
+ return sizeof(*system) - sizeof(system->root_cell_config) +
+ jailhouse_cell_config_size(&system->root_cell_config);
}
static inline const unsigned long *
diff --git a/hypervisor/setup.c b/hypervisor/setup.c
index 98b6d85..8f5158e 100644
--- a/hypervisor/setup.c
+++ b/hypervisor/setup.c
@@ -51,7 +51,7 @@ static void init_early(unsigned int cpu_id)
if (error)
return;
- root_cell.config = &system_config->root_cell;
+ root_cell.config = &system_config->root_cell_config;
root_cell.id = -1;
error = cell_init(&root_cell);
--
2.5.0
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.