[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/18] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with Loong
From: |
Bibo Mao |
Subject: |
[PULL 12/18] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState |
Date: |
Fri, 13 Dec 2024 17:40:21 +0800 |
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>
---
hw/intc/loongarch_extioi.c | 41 +++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index 97d1af5ccc..2ec5a75817 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -391,6 +391,11 @@ static int vmstate_extioi_post_load(void *opaque, int
version_id)
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 = {
.name = "extioi-core",
.version_id = 1,
@@ -402,31 +407,35 @@ static const VMStateDescription vmstate_extioi_core = {
};
static const VMStateDescription vmstate_loongarch_extioi = {
- .name = TYPE_LOONGARCH_EXTIOI,
+ .name = "loongarch.extioi",
.version_id = 3,
.minimum_version_id = 3,
- .post_load = vmstate_extioi_post_load,
+ .post_load = loongarch_extioi_common_post_load,
.fields = (const VMStateField[]) {
- VMSTATE_UINT32_ARRAY(bounce, LoongArchExtIOI, EXTIOI_IRQS_GROUP_COUNT),
- VMSTATE_UINT32_ARRAY(nodetype, LoongArchExtIOI,
+ VMSTATE_UINT32_ARRAY(bounce, LoongArchExtIOICommonState,
+ EXTIOI_IRQS_GROUP_COUNT),
+ VMSTATE_UINT32_ARRAY(nodetype, LoongArchExtIOICommonState,
EXTIOI_IRQS_NODETYPE_COUNT / 2),
- VMSTATE_UINT32_ARRAY(enable, LoongArchExtIOI, EXTIOI_IRQS / 32),
- VMSTATE_UINT32_ARRAY(isr, LoongArchExtIOI, EXTIOI_IRQS / 32),
- VMSTATE_UINT32_ARRAY(ipmap, LoongArchExtIOI, EXTIOI_IRQS_IPMAP_SIZE /
4),
- VMSTATE_UINT32_ARRAY(coremap, LoongArchExtIOI, EXTIOI_IRQS / 4),
-
- VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongArchExtIOI, num_cpu,
- vmstate_extioi_core, ExtIOICore),
- VMSTATE_UINT32(features, LoongArchExtIOI),
- VMSTATE_UINT32(status, LoongArchExtIOI),
+ VMSTATE_UINT32_ARRAY(enable, LoongArchExtIOICommonState,
+ EXTIOI_IRQS / 32),
+ VMSTATE_UINT32_ARRAY(isr, LoongArchExtIOICommonState,
+ EXTIOI_IRQS / 32),
+ VMSTATE_UINT32_ARRAY(ipmap, LoongArchExtIOICommonState,
+ EXTIOI_IRQS_IPMAP_SIZE / 4),
+ VMSTATE_UINT32_ARRAY(coremap, LoongArchExtIOICommonState,
+ EXTIOI_IRQS / 4),
+ 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()
}
};
static Property extioi_properties[] = {
- DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1),
- DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, features,
- EXTIOI_HAS_VIRT_EXTENSION, 0),
+ DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOICommonState, num_cpu, 1),
+ DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOICommonState,
+ features, EXTIOI_HAS_VIRT_EXTENSION, 0),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.5
- [PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize(), (continued)
- [PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize(), Bibo Mao, 2024/12/13
- [PULL 01/18] include: Add loongarch_pic_common header file, Bibo Mao, 2024/12/13
- [PULL 07/18] hw/intc/loongarch_pch: Add pre_save and post_load interfaces, Bibo Mao, 2024/12/13
- [PULL 02/18] include: Move struct LoongArchPCHPIC to loongarch_pic_common header file, Bibo Mao, 2024/12/13
- [PULL 08/18] hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic, Bibo Mao, 2024/12/13
- [PULL 06/18] hw/intc/loongarch_pch: Inherit from loongarch_pic_common, Bibo Mao, 2024/12/13
- [PULL 04/18] hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState, Bibo Mao, 2024/12/13
- [PULL 09/18] include: Add loongarch_extioi_common header file, Bibo Mao, 2024/12/13
- [PULL 10/18] include: Move struct LoongArchExtIOI to header file loongarch_extioi_common, Bibo Mao, 2024/12/13
- [PULL 11/18] include: Rename LoongArchExtIOI with LoongArchExtIOICommonState, Bibo Mao, 2024/12/13
- [PULL 12/18] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState,
Bibo Mao <=
- Re: [PULL 00/18] loongarch-to-apply queue, Stefan Hajnoczi, 2024/12/14
- [PULL 00/18] loongarch-to-apply queue, Bibo Mao, 2024/12/15
- [PULL 01/18] include: Add loongarch_pic_common header file, Bibo Mao, 2024/12/15
- [PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize(), Bibo Mao, 2024/12/15
- [PULL 08/18] hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic, Bibo Mao, 2024/12/15
- [PULL 05/18] hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common, Bibo Mao, 2024/12/15
- [PULL 02/18] include: Move struct LoongArchPCHPIC to loongarch_pic_common header file, Bibo Mao, 2024/12/15
- [PULL 04/18] hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState, Bibo Mao, 2024/12/15
- [PULL 07/18] hw/intc/loongarch_pch: Add pre_save and post_load interfaces, Bibo Mao, 2024/12/15