qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v7 16/29] hw/loongarch: Add LoongArch ipi interrupt suppo


From: yangxiaojuan
Subject: Re: [RFC PATCH v7 16/29] hw/loongarch: Add LoongArch ipi interrupt support(IPI)
Date: Thu, 31 Mar 2022 09:16:47 +0800
User-agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hi Mark,

On 2022/3/29 上午4:15, Mark Cave-Ayland wrote:
+
+#define TYPE_LOONGARCH_IPI "loongarch_ipi"
+OBJECT_DECLARE_SIMPLE_TYPE(LoongArchIPI, LOONGARCH_IPI)
+
+typedef struct IPICore {
+    uint32_t status;
+    uint32_t en;
+    uint32_t set;
+    uint32_t clear;
+    /* 64bit buf divide into 2 32bit buf */
+    uint32_t buf[MAX_IPI_MBX_NUM * 2];
+    qemu_irq irq;
+} IPICore;
+
+typedef struct LoongArchIPI {
+    SysBusDevice parent_obj;
+    IPICore core[MAX_IPI_CORE_NUM];
+    MemoryRegion ipi_mmio[MAX_IPI_CORE_NUM];
+} LoongArchIPI;
+
+#endif

You missed the part in my original comment on patch 14 about dropping the typedef for QOM structs that are defined using OBJECT_DECLARE_TYPE_SIMPLE() i.e.


#define TYPE_LOONGARCH_IPI "loongarch_ipi"
OBJECT_DECLARE_SIMPLE_TYPE(LoongArchIPI, LOONGARCH_IPI)

...
...

typedef struct IPICore {
   uint32_t status;
   uint32_t en;
   uint32_t set;
   uint32_t clear;
   /* 64bit buf divide into 2 32bit buf */
   uint32_t buf[MAX_IPI_MBX_NUM * 2];
   qemu_irq irq;
} IPICore;

struct LoongArchIPI {
    SysBusDevice parent_obj;
    IPICore core[MAX_IPI_CORE_NUM];
    MemoryRegion ipi_mmio[MAX_IPI_CORE_NUM];
};

Sorry for that,   I will be more carefully.

Thanks.
Xiaojuan

ATB,

Mark.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]