qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] target-mips queue
@ 2016-05-13 10:44 Leon Alrae
  2016-05-13 10:44 ` [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code Leon Alrae
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leon Alrae @ 2016-05-13 10:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Aurelien Jarno

Hi,

Just two patches in the first target-mips pullreq for 2.7.

Thanks,
Leon

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>

The following changes since commit bfc766d38e1fae5767d43845c15c79ac8fa6d6af:

  Update version for v2.6.0 release (2016-05-11 16:44:26 +0100)

are available in the git repository at:

  git://github.com/lalrae/qemu.git tags/mips-20160513

for you to fetch changes up to 7fe91a5b33fe100bbc68ee434f947752c69b3f68:

  hw/display: QOM'ify jazz_led.c (2016-05-13 09:33:38 +0100)

----------------------------------------------------------------
MIPS patches 2016-05-13

Changes:
* fix zeroing CP0.WatchLo registers in soft reset
* QOMify Jazz led

----------------------------------------------------------------
Aurelien Jarno (1):
      target-mips: fix call to memset in soft reset code

xiaoqiang.zhao (1):
      hw/display: QOM'ify jazz_led.c

 hw/display/jazz_led.c | 18 +++++++++++-------
 target-mips/helper.c  |  2 +-
 2 files changed, 12 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code
  2016-05-13 10:44 [Qemu-devel] [PULL 0/2] target-mips queue Leon Alrae
@ 2016-05-13 10:44 ` Leon Alrae
  2016-05-13 10:44 ` [Qemu-devel] [PULL 2/2] hw/display: QOM'ify jazz_led.c Leon Alrae
  2016-05-13 12:02 ` [Qemu-devel] [PULL 0/2] target-mips queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Leon Alrae @ 2016-05-13 10:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno, Stefan Weil, qemu-stable

From: Aurelien Jarno <aurelien@aurel32.net>

Recent versions of GCC report the following error when compiling
target-mips/helper.c:

  qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length
  equal to number of elements without multiplication by element size
  [-Wmemset-elt-size]

This is indeed correct and due to a wrong usage of sizeof(). Fix that.

Cc: Stefan Weil <sw@weilnetz.de>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: qemu-stable@nongnu.org
LP: https://bugs.launchpad.net/qemu/+bug/1577841
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
 target-mips/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-mips/helper.c b/target-mips/helper.c
index 1004ede..cfea177 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -539,7 +539,7 @@ void mips_cpu_do_interrupt(CPUState *cs)
         break;
     case EXCP_SRESET:
         env->CP0_Status |= (1 << CP0St_SR);
-        memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo));
+        memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo));
         goto set_error_EPC;
     case EXCP_NMI:
         env->CP0_Status |= (1 << CP0St_NMI);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] hw/display: QOM'ify jazz_led.c
  2016-05-13 10:44 [Qemu-devel] [PULL 0/2] target-mips queue Leon Alrae
  2016-05-13 10:44 ` [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code Leon Alrae
@ 2016-05-13 10:44 ` Leon Alrae
  2016-05-13 12:02 ` [Qemu-devel] [PULL 0/2] target-mips queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Leon Alrae @ 2016-05-13 10:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: xiaoqiang.zhao

From: "xiaoqiang.zhao" <zxq_yx_007@163.com>

* Drop the old SysBus init function and use instance_init
* Move graphic_console_init into realize stage

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
 hw/display/jazz_led.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c
index 09dcdb4..b72fdb1 100644
--- a/hw/display/jazz_led.c
+++ b/hw/display/jazz_led.c
@@ -267,16 +267,20 @@ static const GraphicHwOps jazz_led_ops = {
     .text_update = jazz_led_text_update,
 };
 
-static int jazz_led_init(SysBusDevice *dev)
+static void jazz_led_init(Object *obj)
 {
-    LedState *s = JAZZ_LED(dev);
+    LedState *s = JAZZ_LED(obj);
+    SysBusDevice *dev = SYS_BUS_DEVICE(obj);
 
-    memory_region_init_io(&s->iomem, OBJECT(s), &led_ops, s, "led", 1);
+    memory_region_init_io(&s->iomem, obj, &led_ops, s, "led", 1);
     sysbus_init_mmio(dev, &s->iomem);
+}
 
-    s->con = graphic_console_init(DEVICE(dev), 0, &jazz_led_ops, s);
+static void jazz_led_realize(DeviceState *dev, Error **errp)
+{
+    LedState *s = JAZZ_LED(dev);
 
-    return 0;
+    s->con = graphic_console_init(dev, 0, &jazz_led_ops, s);
 }
 
 static void jazz_led_reset(DeviceState *d)
@@ -291,18 +295,18 @@ static void jazz_led_reset(DeviceState *d)
 static void jazz_led_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
-    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
-    k->init = jazz_led_init;
     dc->desc = "Jazz LED display",
     dc->vmsd = &vmstate_jazz_led;
     dc->reset = jazz_led_reset;
+    dc->realize = jazz_led_realize;
 }
 
 static const TypeInfo jazz_led_info = {
     .name          = TYPE_JAZZ_LED,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(LedState),
+    .instance_init = jazz_led_init,
     .class_init    = jazz_led_class_init,
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] target-mips queue
  2016-05-13 10:44 [Qemu-devel] [PULL 0/2] target-mips queue Leon Alrae
  2016-05-13 10:44 ` [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code Leon Alrae
  2016-05-13 10:44 ` [Qemu-devel] [PULL 2/2] hw/display: QOM'ify jazz_led.c Leon Alrae
@ 2016-05-13 12:02 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2016-05-13 12:02 UTC (permalink / raw)
  To: Leon Alrae; +Cc: QEMU Developers, Aurelien Jarno

On 13 May 2016 at 11:44, Leon Alrae <leon.alrae@imgtec.com> wrote:
> Hi,
>
> Just two patches in the first target-mips pullreq for 2.7.
>
> Thanks,
> Leon
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
>
> The following changes since commit bfc766d38e1fae5767d43845c15c79ac8fa6d6af:
>
>   Update version for v2.6.0 release (2016-05-11 16:44:26 +0100)
>
> are available in the git repository at:
>
>   git://github.com/lalrae/qemu.git tags/mips-20160513
>
> for you to fetch changes up to 7fe91a5b33fe100bbc68ee434f947752c69b3f68:
>
>   hw/display: QOM'ify jazz_led.c (2016-05-13 09:33:38 +0100)
>
> ----------------------------------------------------------------
> MIPS patches 2016-05-13
>
> Changes:
> * fix zeroing CP0.WatchLo registers in soft reset
> * QOMify Jazz led
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-13 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 10:44 [Qemu-devel] [PULL 0/2] target-mips queue Leon Alrae
2016-05-13 10:44 ` [Qemu-devel] [PULL 1/2] target-mips: fix call to memset in soft reset code Leon Alrae
2016-05-13 10:44 ` [Qemu-devel] [PULL 2/2] hw/display: QOM'ify jazz_led.c Leon Alrae
2016-05-13 12:02 ` [Qemu-devel] [PULL 0/2] target-mips queue Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).