mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState
With some structure such as vmstate and property, rename LoongArchExtIOI with LoongArchExtIOICommonState, these common structure will be moved to common file. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
6f54d92093
commit
c169b51b17
1 changed files with 25 additions and 16 deletions
|
@ -391,6 +391,11 @@ static int vmstate_extioi_post_load(void *opaque, int version_id)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int loongarch_extioi_common_post_load(void *opaque, int version_id)
|
||||||
|
{
|
||||||
|
return vmstate_extioi_post_load(opaque, version_id);
|
||||||
|
}
|
||||||
|
|
||||||
static const VMStateDescription vmstate_extioi_core = {
|
static const VMStateDescription vmstate_extioi_core = {
|
||||||
.name = "extioi-core",
|
.name = "extioi-core",
|
||||||
.version_id = 1,
|
.version_id = 1,
|
||||||
|
@ -402,31 +407,35 @@ static const VMStateDescription vmstate_extioi_core = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const VMStateDescription vmstate_loongarch_extioi = {
|
static const VMStateDescription vmstate_loongarch_extioi = {
|
||||||
.name = TYPE_LOONGARCH_EXTIOI,
|
.name = "loongarch.extioi",
|
||||||
.version_id = 3,
|
.version_id = 3,
|
||||||
.minimum_version_id = 3,
|
.minimum_version_id = 3,
|
||||||
.post_load = vmstate_extioi_post_load,
|
.post_load = loongarch_extioi_common_post_load,
|
||||||
.fields = (const VMStateField[]) {
|
.fields = (const VMStateField[]) {
|
||||||
VMSTATE_UINT32_ARRAY(bounce, LoongArchExtIOI, EXTIOI_IRQS_GROUP_COUNT),
|
VMSTATE_UINT32_ARRAY(bounce, LoongArchExtIOICommonState,
|
||||||
VMSTATE_UINT32_ARRAY(nodetype, LoongArchExtIOI,
|
EXTIOI_IRQS_GROUP_COUNT),
|
||||||
|
VMSTATE_UINT32_ARRAY(nodetype, LoongArchExtIOICommonState,
|
||||||
EXTIOI_IRQS_NODETYPE_COUNT / 2),
|
EXTIOI_IRQS_NODETYPE_COUNT / 2),
|
||||||
VMSTATE_UINT32_ARRAY(enable, LoongArchExtIOI, EXTIOI_IRQS / 32),
|
VMSTATE_UINT32_ARRAY(enable, LoongArchExtIOICommonState,
|
||||||
VMSTATE_UINT32_ARRAY(isr, LoongArchExtIOI, EXTIOI_IRQS / 32),
|
EXTIOI_IRQS / 32),
|
||||||
VMSTATE_UINT32_ARRAY(ipmap, LoongArchExtIOI, EXTIOI_IRQS_IPMAP_SIZE / 4),
|
VMSTATE_UINT32_ARRAY(isr, LoongArchExtIOICommonState,
|
||||||
VMSTATE_UINT32_ARRAY(coremap, LoongArchExtIOI, EXTIOI_IRQS / 4),
|
EXTIOI_IRQS / 32),
|
||||||
|
VMSTATE_UINT32_ARRAY(ipmap, LoongArchExtIOICommonState,
|
||||||
VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongArchExtIOI, num_cpu,
|
EXTIOI_IRQS_IPMAP_SIZE / 4),
|
||||||
vmstate_extioi_core, ExtIOICore),
|
VMSTATE_UINT32_ARRAY(coremap, LoongArchExtIOICommonState,
|
||||||
VMSTATE_UINT32(features, LoongArchExtIOI),
|
EXTIOI_IRQS / 4),
|
||||||
VMSTATE_UINT32(status, LoongArchExtIOI),
|
VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongArchExtIOICommonState,
|
||||||
|
num_cpu, vmstate_extioi_core, ExtIOICore),
|
||||||
|
VMSTATE_UINT32(features, LoongArchExtIOICommonState),
|
||||||
|
VMSTATE_UINT32(status, LoongArchExtIOICommonState),
|
||||||
VMSTATE_END_OF_LIST()
|
VMSTATE_END_OF_LIST()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Property extioi_properties[] = {
|
static const Property extioi_properties[] = {
|
||||||
DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1),
|
DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOICommonState, num_cpu, 1),
|
||||||
DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, features,
|
DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOICommonState,
|
||||||
EXTIOI_HAS_VIRT_EXTENSION, 0),
|
features, EXTIOI_HAS_VIRT_EXTENSION, 0),
|
||||||
DEFINE_PROP_END_OF_LIST(),
|
DEFINE_PROP_END_OF_LIST(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue