@@ -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;
@@ -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,
};