[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/17] hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPI
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 02/17] hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPIState |
Date: |
Wed, 17 Jul 2024 23:46:53 +0200 |
From: Bibo Mao <maobibo@loongson.cn>
We'll have to add LoongsonIPIClass in few commits,
so rename LoongsonIPI as LoongsonIPIState for clarity.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
[PMD: Extracted from bigger commit, added commit description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/intc/loongson_ipi.h | 6 +++---
hw/intc/loongson_ipi.c | 16 ++++++++--------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/hw/intc/loongson_ipi.h b/include/hw/intc/loongson_ipi.h
index 3f795edbf3..efb772f384 100644
--- a/include/hw/intc/loongson_ipi.h
+++ b/include/hw/intc/loongson_ipi.h
@@ -31,10 +31,10 @@
#define IPI_MBX_NUM 4
#define TYPE_LOONGSON_IPI "loongson_ipi"
-OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPI, LOONGSON_IPI)
+OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPIState, LOONGSON_IPI)
typedef struct IPICore {
- LoongsonIPI *ipi;
+ LoongsonIPIState *ipi;
MemoryRegion *ipi_mmio_mem;
uint32_t status;
uint32_t en;
@@ -45,7 +45,7 @@ typedef struct IPICore {
qemu_irq irq;
} IPICore;
-struct LoongsonIPI {
+struct LoongsonIPIState {
SysBusDevice parent_obj;
MemoryRegion ipi_iocsr_mem;
MemoryRegion ipi64_iocsr_mem;
diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c
index e7979dbdd8..a34e7e634f 100644
--- a/hw/intc/loongson_ipi.c
+++ b/hw/intc/loongson_ipi.c
@@ -64,7 +64,7 @@ static MemTxResult loongson_ipi_iocsr_readl(void *opaque,
hwaddr addr,
uint64_t *data,
unsigned size, MemTxAttrs attrs)
{
- LoongsonIPI *ipi = opaque;
+ LoongsonIPIState *ipi = opaque;
IPICore *s;
if (attrs.requester_id >= ipi->num_cpu) {
@@ -160,7 +160,7 @@ static MemTxResult loongson_ipi_core_writel(void *opaque,
hwaddr addr,
MemTxAttrs attrs)
{
IPICore *s = opaque;
- LoongsonIPI *ipi = s->ipi;
+ LoongsonIPIState *ipi = s->ipi;
int index = 0;
uint32_t cpuid;
uint8_t vector;
@@ -214,7 +214,7 @@ static MemTxResult loongson_ipi_iocsr_writel(void *opaque,
hwaddr addr,
uint64_t val, unsigned size,
MemTxAttrs attrs)
{
- LoongsonIPI *ipi = opaque;
+ LoongsonIPIState *ipi = opaque;
IPICore *s;
if (attrs.requester_id >= ipi->num_cpu) {
@@ -277,7 +277,7 @@ static const MemoryRegionOps loongson_ipi64_ops = {
static void loongson_ipi_realize(DeviceState *dev, Error **errp)
{
- LoongsonIPI *s = LOONGSON_IPI(dev);
+ LoongsonIPIState *s = LOONGSON_IPI(dev);
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
int i;
@@ -337,14 +337,14 @@ static const VMStateDescription vmstate_loongson_ipi = {
.version_id = 2,
.minimum_version_id = 2,
.fields = (const VMStateField[]) {
- VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongsonIPI, num_cpu,
+ VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongsonIPIState, num_cpu,
vmstate_ipi_core, IPICore),
VMSTATE_END_OF_LIST()
}
};
static Property ipi_properties[] = {
- DEFINE_PROP_UINT32("num-cpu", LoongsonIPI, num_cpu, 1),
+ DEFINE_PROP_UINT32("num-cpu", LoongsonIPIState, num_cpu, 1),
DEFINE_PROP_END_OF_LIST(),
};
@@ -359,7 +359,7 @@ static void loongson_ipi_class_init(ObjectClass *klass,
void *data)
static void loongson_ipi_finalize(Object *obj)
{
- LoongsonIPI *s = LOONGSON_IPI(obj);
+ LoongsonIPIState *s = LOONGSON_IPI(obj);
g_free(s->cpu);
}
@@ -367,7 +367,7 @@ static void loongson_ipi_finalize(Object *obj)
static const TypeInfo loongson_ipi_info = {
.name = TYPE_LOONGSON_IPI,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(LoongsonIPI),
+ .instance_size = sizeof(LoongsonIPIState),
.class_init = loongson_ipi_class_init,
.instance_finalize = loongson_ipi_finalize,
};
--
2.41.0
- [PATCH v3 00/17] Reconstruct loongson ipi driver, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 02/17] hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPIState,
Philippe Mathieu-Daudé <=
- [PATCH v3 01/17] hw/intc/loongson_ipi: Access memory in little endian, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 03/17] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize(), Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 04/17] hw/intc/loongson_ipi: Extract loongson_ipi_common_realize(), Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 05/17] hw/intc/loongson_ipi: Add TYPE_LOONGSON_IPI_COMMON stub, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 06/17] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 07/17] hw/intc/loongson_ipi: Move IPICore::mmio_mem to LoongsonIPIState, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 08/17] hw/intc/loongson_ipi: Move IPICore structure to loongson_ipi_common.h, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v3 09/17] hw/intc/loongson_ipi: Pass LoongsonIPICommonState to send_ipi_data(), Philippe Mathieu-Daudé, 2024/07/17