Skip to contentSkip to conversation

target-mips queue

GIT PULL Yongbok Kim 2 participants 6 messages Sep 29, 2016 – Sep 30, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

This is my first pull-req for MIPS.

Thanks,
Yongbok

The following changes since commit c640f2849ee8775fe1bbd7a2772610aa77816f9f:

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-09-28 23:02:56 +0100)

are available in the git repository at:

git://github.com/yongbok/upstream-qemu.git tags/mips-20160929

for you to fetch changes up to 73bfa8c0e0295df92d5fe61e0149db7b36cdc0c4:

hw/dma: vmstateify rc4030 (2016-09-29 12:07:51 +0100)

----------------------------------------------------------------
MIPS patches 2016-09-29

Changes:
* MIPS Maintainer update
* vmstateify rc4030

----------------------------------------------------------------
Dr. David Alan Gilbert (1):
hw/dma: vmstateify rc4030

Leon Alrae (1):
MAINTAINERS: update target-mips maintainers

 MAINTAINERS     |  2 +-
 hw/dma/rc4030.c | 81 +++++++++++++++++++--------------------------------------
 2 files changed, 28 insertions(+), 55 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/2] MAINTAINERS: update target-mips maintainers

From: Leon Alrae <[email protected]>

Yongbok Kim takes over the target-mips maintenance from me.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index f3c1f7f..8b18ad0 100644
@@ -145,7 +145,7 @@ F: disas/microblaze.c
 
 MIPS
 M: Aurelien Jarno <[email protected]>
-M: Leon Alrae <[email protected]>
+M: Yongbok Kim <[email protected]>
 S: Maintained
 F: target-mips/
 F: hw/mips/
Signature · 1 line
2.7.4
#2 lore raw

[Qemu-devel] [PULL 2/2] hw/dma: vmstateify rc4030

In reply to Yongbok Kim

From: "Dr. David Alan Gilbert" <[email protected]>

Convert rc4030 to VMState.
Now saving the whole 16 entries rather than 15.

---
 hw/dma/rc4030.c | 81 +++++++++++++++++++--------------------------------------
 1 file changed, 27 insertions(+), 54 deletions(-)
hw/dma/rc4030.c +27 -54
index 2f2576f..17c8518 100644
@@ -616,34 +616,9 @@ static void rc4030_reset(DeviceState *dev)
     qemu_irq_lower(s->jazz_bus_irq);
 }
 
-static int rc4030_load(QEMUFile *f, void *opaque, int version_id)
+static int rc4030_post_load(void *opaque, int version_id)
 {
     rc4030State* s = opaque;
-    int i, j;
-
-    if (version_id != 2)
-        return -EINVAL;
-
-    s->config = qemu_get_be32(f);
-    s->invalid_address_register = qemu_get_be32(f);
-    for (i = 0; i < 8; i++)
-        for (j = 0; j < 4; j++)
-            s->dma_regs[i][j] = qemu_get_be32(f);
-    s->dma_tl_base = qemu_get_be32(f);
-    s->dma_tl_limit = qemu_get_be32(f);
-    s->cache_maint = qemu_get_be32(f);
-    s->remote_failed_address = qemu_get_be32(f);
-    s->memory_failed_address = qemu_get_be32(f);
-    s->cache_ptag = qemu_get_be32(f);
-    s->cache_ltag = qemu_get_be32(f);
-    s->cache_bmask = qemu_get_be32(f);
-    s->memory_refresh_rate = qemu_get_be32(f);
-    s->nvram_protect = qemu_get_be32(f);
-    for (i = 0; i < 15; i++)
-        s->rem_speed[i] = qemu_get_be32(f);
-    s->imr_jazz = qemu_get_be32(f);
-    s->isr_jazz = qemu_get_be32(f);
-    s->itr = qemu_get_be32(f);
 
     set_next_tick(s);
     update_jazz_irq(s);
@@ -651,32 +626,31 @@ static int rc4030_load(QEMUFile *f, void *opaque, int version_id)
     return 0;
 }
 
-static void rc4030_save(QEMUFile *f, void *opaque)
-{
-    rc4030State* s = opaque;
-    int i, j;
-
-    qemu_put_be32(f, s->config);
-    qemu_put_be32(f, s->invalid_address_register);
-    for (i = 0; i < 8; i++)
-        for (j = 0; j < 4; j++)
-            qemu_put_be32(f, s->dma_regs[i][j]);
-    qemu_put_be32(f, s->dma_tl_base);
-    qemu_put_be32(f, s->dma_tl_limit);
-    qemu_put_be32(f, s->cache_maint);
-    qemu_put_be32(f, s->remote_failed_address);
-    qemu_put_be32(f, s->memory_failed_address);
-    qemu_put_be32(f, s->cache_ptag);
-    qemu_put_be32(f, s->cache_ltag);
-    qemu_put_be32(f, s->cache_bmask);
-    qemu_put_be32(f, s->memory_refresh_rate);
-    qemu_put_be32(f, s->nvram_protect);
-    for (i = 0; i < 15; i++)
-        qemu_put_be32(f, s->rem_speed[i]);
-    qemu_put_be32(f, s->imr_jazz);
-    qemu_put_be32(f, s->isr_jazz);
-    qemu_put_be32(f, s->itr);
-}
+static const VMStateDescription vmstate_rc4030 = {
+    .name = "rc4030",
+    .version_id = 3,
+    .post_load = rc4030_post_load,
+    .fields = (VMStateField []) {
+        VMSTATE_UINT32(config, rc4030State),
+        VMSTATE_UINT32(invalid_address_register, rc4030State),
+        VMSTATE_UINT32_2DARRAY(dma_regs, rc4030State, 8, 4),
+        VMSTATE_UINT32(dma_tl_base, rc4030State),
+        VMSTATE_UINT32(dma_tl_limit, rc4030State),
+        VMSTATE_UINT32(cache_maint, rc4030State),
+        VMSTATE_UINT32(remote_failed_address, rc4030State),
+        VMSTATE_UINT32(memory_failed_address, rc4030State),
+        VMSTATE_UINT32(cache_ptag, rc4030State),
+        VMSTATE_UINT32(cache_ltag, rc4030State),
+        VMSTATE_UINT32(cache_bmask, rc4030State),
+        VMSTATE_UINT32(memory_refresh_rate, rc4030State),
+        VMSTATE_UINT32(nvram_protect, rc4030State),
+        VMSTATE_UINT32_ARRAY(rem_speed, rc4030State, 16),
+        VMSTATE_UINT32(imr_jazz, rc4030State),
+        VMSTATE_UINT32(isr_jazz, rc4030State),
+        VMSTATE_UINT32(itr, rc4030State),
+        VMSTATE_END_OF_LIST()
+    }
+};
 
 static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_write)
 {
@@ -753,8 +727,6 @@ static void rc4030_initfn(Object *obj)
     sysbus_init_irq(sysbus, &s->timer_irq);
     sysbus_init_irq(sysbus, &s->jazz_bus_irq);
 
-    register_savevm(NULL, "rc4030", 0, 2, rc4030_save, rc4030_load, s);
-
     sysbus_init_mmio(sysbus, &s->iomem_chipset);
     sysbus_init_mmio(sysbus, &s->iomem_jazzio);
 }
@@ -813,6 +785,7 @@ static void rc4030_class_init(ObjectClass *klass, void *class_data)
     dc->realize = rc4030_realize;
     dc->unrealize = rc4030_unrealize;
     dc->reset = rc4030_reset;
+    dc->vmsd = &vmstate_rc4030;
 }
 
 static const TypeInfo rc4030_info = {
Signature · 1 line
2.7.4
#3 lore raw
In reply to Yongbok Kim
Quoted 17 lines · Yongbok Kim

Hi,

This is my first pull-req for MIPS.

Thanks,
Yongbok

The following changes since commit c640f2849ee8775fe1bbd7a2772610aa77816f9f:

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-09-28 23:02:56 +0100)

are available in the git repository at:

git://github.com/yongbok/upstream-qemu.git tags/mips-20160929

for you to fetch changes up to 73bfa8c0e0295df92d5fe61e0149db7b36cdc0c4:

Quoted 8 lines

hw/dma: vmstateify rc4030 (2016-09-29 12:07:51 +0100)

----------------------------------------------------------------
MIPS patches 2016-09-29

Changes:
* MIPS Maintainer update
* vmstateify rc4030

Your GPG key hasn't been signed by anybody -- are you in a position to get it signed by somebody else who can in-person verify your identity (eg Leon)?

thanks
-- PMM

#4 lore raw
Quoted 8 lines

Your GPG key hasn't been signed by anybody -- are you in a position to get it signed by somebody else who can in-person verify your identity (eg Leon)?

thanks
-- PMM

Hi Peter,

We have just arranged the key signing and Leon has signed my key.

Thanks,
Yongbok

#5 lore raw
Quoted 8 lines · Yongbok Kim
Quoted 4 lines

Your GPG key hasn't been signed by anybody -- are you in a position to get it signed by somebody else who can in-person verify your identity (eg Leon)?

Hi Peter,

We have just arranged the key signing and Leon has signed my key.

Thanks; I have applied the pull request to master.

-- PMM