qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix some printf errors when debug is enabled
@ 2013-06-13 10:51 Hu Tao
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] fix typo: apci -> acpi Hu Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Hu Tao @ 2013-06-13 10:51 UTC (permalink / raw)
  To: qemu-trivial, qemu-devel


Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
 cputlb.c        | 4 ++--
 hw/acpi/piix4.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cputlb.c b/cputlb.c
index 86666c8..1230e9e 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
 
 #if defined(DEBUG_TLB)
     printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
-           " prot=%x idx=%d pd=0x%08lx\n",
-           vaddr, paddr, prot, mmu_idx, pd);
+           " prot=%x idx=%d\n",
+           vaddr, paddr, prot, mmu_idx);
 #endif
 
     address = vaddr;
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index e6525ac..eafa76f 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -518,7 +518,7 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, unsigned width)
     PIIX4PMState *s = opaque;
     uint32_t val = acpi_gpe_ioport_readb(&s->ar, addr);
 
-    PIIX4_DPRINTF("gpe read %x == %x\n", addr, val);
+    PIIX4_DPRINTF("gpe read %lx == %x\n", addr, val);
     return val;
 }
 
@@ -530,7 +530,7 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint64_t val,
     acpi_gpe_ioport_writeb(&s->ar, addr, val);
     pm_update_sci(s);
 
-    PIIX4_DPRINTF("gpe write %x <== %d\n", addr, val);
+    PIIX4_DPRINTF("gpe write %lx <== %lu\n", addr, val);
 }
 
 static const MemoryRegionOps piix4_gpe_ops = {
@@ -579,7 +579,7 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
     switch (addr) {
     case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
         acpi_piix_eject_slot(opaque, (uint32_t)data);
-        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== % " PRIu64 "\n",
+        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
                       addr, data);
         break;
     default:
-- 
1.8.2.3

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

* [Qemu-devel] [PATCH] fix typo: apci -> acpi
  2013-06-13 10:51 [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Hu Tao
@ 2013-06-13 10:51 ` Hu Tao
  2013-06-13 11:05   ` Andreas Färber
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type Hu Tao
  2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
  2 siblings, 1 reply; 16+ messages in thread
From: Hu Tao @ 2013-06-13 10:51 UTC (permalink / raw)
  To: qemu-trivial, qemu-devel


Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
 hw/acpi/ich9.c  | 4 ++--
 hw/acpi/piix4.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 4a17f32..100b01f 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -215,11 +215,11 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
     acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io, 2);
 
     acpi_gpe_init(&pm->acpi_regs, ICH9_PMIO_GPE0_LEN);
-    memory_region_init_io(&pm->io_gpe, &ich9_gpe_ops, pm, "apci-gpe0",
+    memory_region_init_io(&pm->io_gpe, &ich9_gpe_ops, pm, "acpi-gpe0",
                           ICH9_PMIO_GPE0_LEN);
     memory_region_add_subregion(&pm->io, ICH9_PMIO_GPE0_STS, &pm->io_gpe);
 
-    memory_region_init_io(&pm->io_smi, &ich9_smi_ops, pm, "apci-smi",
+    memory_region_init_io(&pm->io_smi, &ich9_smi_ops, pm, "acpi-smi",
                           8);
     memory_region_add_subregion(&pm->io, ICH9_PMIO_SMI_EN, &pm->io_smi);
 
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index eafa76f..ad4a364 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -670,18 +670,18 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,
 static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
                                            PCIBus *bus, PIIX4PMState *s)
 {
-    memory_region_init_io(&s->io_gpe, &piix4_gpe_ops, s, "apci-gpe0",
+    memory_region_init_io(&s->io_gpe, &piix4_gpe_ops, s, "acpi-gpe0",
                           GPE_LEN);
     memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
 
-    memory_region_init_io(&s->io_pci, &piix4_pci_ops, s, "apci-pci-hotplug",
+    memory_region_init_io(&s->io_pci, &piix4_pci_ops, s, "acpi-pci-hotplug",
                           PCI_HOTPLUG_SIZE);
     memory_region_add_subregion(parent, PCI_HOTPLUG_ADDR,
                                 &s->io_pci);
     pci_bus_hotplug(bus, piix4_device_hotplug, &s->dev.qdev);
 
     qemu_for_each_cpu(piix4_init_cpu_status, &s->gpe_cpu);
-    memory_region_init_io(&s->io_cpu, &cpu_hotplug_ops, s, "apci-cpu-hotplug",
+    memory_region_init_io(&s->io_cpu, &cpu_hotplug_ops, s, "acpi-cpu-hotplug",
                           PIIX4_PROC_LEN);
     memory_region_add_subregion(parent, PIIX4_PROC_BASE, &s->io_cpu);
     s->cpu_added_notifier.notify = piix4_cpu_added_req;
-- 
1.8.2.3

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

* [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type
  2013-06-13 10:51 [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Hu Tao
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] fix typo: apci -> acpi Hu Tao
@ 2013-06-13 10:51 ` Hu Tao
  2013-06-14  7:09   ` Hu Tao
  2013-06-14 13:02   ` Peter Crosthwaite
  2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
  2 siblings, 2 replies; 16+ messages in thread
From: Hu Tao @ 2013-06-13 10:51 UTC (permalink / raw)
  To: qemu-trivial, qemu-devel

Since it's called in object_initialize_with_type later.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
 qom/object.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 803b94b..38dc45e 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -406,9 +406,6 @@ Object *object_new_with_type(Type type)
 {
     Object *obj;
 
-    g_assert(type != NULL);
-    type_initialize(type);
-
     obj = g_malloc(type->instance_size);
     object_initialize_with_type(obj, type);
     obj->free = g_free;
-- 
1.8.2.3

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

* Re: [Qemu-devel] [PATCH] fix typo: apci -> acpi
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] fix typo: apci -> acpi Hu Tao
@ 2013-06-13 11:05   ` Andreas Färber
  2013-06-17  2:08     ` Hu Tao
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Färber @ 2013-06-13 11:05 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

Am 13.06.2013 12:51, schrieb Hu Tao:
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
>  hw/acpi/ich9.c  | 4 ++--
>  hw/acpi/piix4.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] fix some printf errors when debug is enabled
  2013-06-13 10:51 [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Hu Tao
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] fix typo: apci -> acpi Hu Tao
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type Hu Tao
@ 2013-06-13 11:10 ` Andreas Färber
  2013-06-13 11:13   ` Andreas Färber
                     ` (2 more replies)
  2 siblings, 3 replies; 16+ messages in thread
From: Andreas Färber @ 2013-06-13 11:10 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

Am 13.06.2013 12:51, schrieb Hu Tao:
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
>  cputlb.c        | 4 ++--
>  hw/acpi/piix4.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/cputlb.c b/cputlb.c
> index 86666c8..1230e9e 100644
> --- a/cputlb.c
> +++ b/cputlb.c
> @@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
>  
>  #if defined(DEBUG_TLB)
>      printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
> -           " prot=%x idx=%d pd=0x%08lx\n",
> -           vaddr, paddr, prot, mmu_idx, pd);
> +           " prot=%x idx=%d\n",
> +           vaddr, paddr, prot, mmu_idx);
>  #endif
>  
>      address = vaddr;
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index e6525ac..eafa76f 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -518,7 +518,7 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, unsigned width)
>      PIIX4PMState *s = opaque;
>      uint32_t val = acpi_gpe_ioport_readb(&s->ar, addr);
>  
> -    PIIX4_DPRINTF("gpe read %x == %x\n", addr, val);
> +    PIIX4_DPRINTF("gpe read %lx == %x\n", addr, val);

You need HWADDR_PRIx as seen below, because it might be %llx on some
platforms. While touching it, changing %x to PRIx32 would be even better.

>      return val;
>  }
>  
> @@ -530,7 +530,7 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint64_t val,
>      acpi_gpe_ioport_writeb(&s->ar, addr, val);
>      pm_update_sci(s);
>  
> -    PIIX4_DPRINTF("gpe write %x <== %d\n", addr, val);
> +    PIIX4_DPRINTF("gpe write %lx <== %lu\n", addr, val);

HWADDR_PRIx, PRIx64

Regards,
Andreas

>  }
>  
>  static const MemoryRegionOps piix4_gpe_ops = {
> @@ -579,7 +579,7 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
>      switch (addr) {
>      case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
>          acpi_piix_eject_slot(opaque, (uint32_t)data);
> -        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== % " PRIu64 "\n",
> +        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
>                        addr, data);
>          break;
>      default:
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] fix some printf errors when debug is enabled
  2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
@ 2013-06-13 11:13   ` Andreas Färber
  2013-06-14  6:52   ` Hu Tao
  2013-06-14  7:11   ` [Qemu-devel] [PATCH v2] piix: " Hu Tao
  2 siblings, 0 replies; 16+ messages in thread
From: Andreas Färber @ 2013-06-13 11:13 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

Am 13.06.2013 13:10, schrieb Andreas Färber:
> Am 13.06.2013 12:51, schrieb Hu Tao:
>> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
>> ---
>>  cputlb.c        | 4 ++--
>>  hw/acpi/piix4.c | 6 +++---
>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/cputlb.c b/cputlb.c
>> index 86666c8..1230e9e 100644
>> --- a/cputlb.c
>> +++ b/cputlb.c
>> @@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
>>  
>>  #if defined(DEBUG_TLB)
>>      printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
>> -           " prot=%x idx=%d pd=0x%08lx\n",
>> -           vaddr, paddr, prot, mmu_idx, pd);
>> +           " prot=%x idx=%d\n",
>> +           vaddr, paddr, prot, mmu_idx);
>>  #endif
>>  
>>      address = vaddr;
>> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
>> index e6525ac..eafa76f 100644
>> --- a/hw/acpi/piix4.c
>> +++ b/hw/acpi/piix4.c
>> @@ -518,7 +518,7 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, unsigned width)
>>      PIIX4PMState *s = opaque;
>>      uint32_t val = acpi_gpe_ioport_readb(&s->ar, addr);
>>  
>> -    PIIX4_DPRINTF("gpe read %x == %x\n", addr, val);
>> +    PIIX4_DPRINTF("gpe read %lx == %x\n", addr, val);
> 
> You need HWADDR_PRIx as seen below, because it might be %llx on some
> platforms. While touching it, changing %x to PRIx32 would be even better.
> 
>>      return val;
>>  }
>>  
>> @@ -530,7 +530,7 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint64_t val,
>>      acpi_gpe_ioport_writeb(&s->ar, addr, val);
>>      pm_update_sci(s);
>>  
>> -    PIIX4_DPRINTF("gpe write %x <== %d\n", addr, val);
>> +    PIIX4_DPRINTF("gpe write %lx <== %lu\n", addr, val);
> 
> HWADDR_PRIx, PRIx64

err... PRIu64 obviously.

> 
> Regards,
> Andreas
> 
>>  }
>>  
>>  static const MemoryRegionOps piix4_gpe_ops = {
>> @@ -579,7 +579,7 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
>>      switch (addr) {
>>      case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
>>          acpi_piix_eject_slot(opaque, (uint32_t)data);
>> -        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== % " PRIu64 "\n",
>> +        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
>>                        addr, data);
>>          break;
>>      default:
>>
> 
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] fix some printf errors when debug is enabled
  2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
  2013-06-13 11:13   ` Andreas Färber
@ 2013-06-14  6:52   ` Hu Tao
  2013-06-14  7:11   ` [Qemu-devel] [PATCH v2] piix: " Hu Tao
  2 siblings, 0 replies; 16+ messages in thread
From: Hu Tao @ 2013-06-14  6:52 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-trivial, qemu-devel

On Thu, Jun 13, 2013 at 01:10:04PM +0200, Andreas Färber wrote:
> Am 13.06.2013 12:51, schrieb Hu Tao:
> > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> > ---
> >  cputlb.c        | 4 ++--
> >  hw/acpi/piix4.c | 6 +++---
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/cputlb.c b/cputlb.c
> > index 86666c8..1230e9e 100644
> > --- a/cputlb.c
> > +++ b/cputlb.c
> > @@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
> >  
> >  #if defined(DEBUG_TLB)
> >      printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
> > -           " prot=%x idx=%d pd=0x%08lx\n",
> > -           vaddr, paddr, prot, mmu_idx, pd);
> > +           " prot=%x idx=%d\n",
> > +           vaddr, paddr, prot, mmu_idx);
> >  #endif
> >  
> >      address = vaddr;
> > diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> > index e6525ac..eafa76f 100644
> > --- a/hw/acpi/piix4.c
> > +++ b/hw/acpi/piix4.c
> > @@ -518,7 +518,7 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, unsigned width)
> >      PIIX4PMState *s = opaque;
> >      uint32_t val = acpi_gpe_ioport_readb(&s->ar, addr);
> >  
> > -    PIIX4_DPRINTF("gpe read %x == %x\n", addr, val);
> > +    PIIX4_DPRINTF("gpe read %lx == %x\n", addr, val);
> 
> You need HWADDR_PRIx as seen below, because it might be %llx on some
> platforms. While touching it, changing %x to PRIx32 would be even better.

OK. Thanks!

> 
> >      return val;
> >  }
> >  
> > @@ -530,7 +530,7 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint64_t val,
> >      acpi_gpe_ioport_writeb(&s->ar, addr, val);
> >      pm_update_sci(s);
> >  
> > -    PIIX4_DPRINTF("gpe write %x <== %d\n", addr, val);
> > +    PIIX4_DPRINTF("gpe write %lx <== %lu\n", addr, val);
> 
> HWADDR_PRIx, PRIx64
> 
> Regards,
> Andreas
> 
> >  }
> >  
> >  static const MemoryRegionOps piix4_gpe_ops = {
> > @@ -579,7 +579,7 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
> >      switch (addr) {
> >      case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
> >          acpi_piix_eject_slot(opaque, (uint32_t)data);
> > -        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== % " PRIu64 "\n",
> > +        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
> >                        addr, data);
> >          break;
> >      default:
> > 
> 
> 
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type Hu Tao
@ 2013-06-14  7:09   ` Hu Tao
  2013-06-14 13:06     ` Peter Crosthwaite
  2013-06-14 13:02   ` Peter Crosthwaite
  1 sibling, 1 reply; 16+ messages in thread
From: Hu Tao @ 2013-06-14  7:09 UTC (permalink / raw)
  To: qemu-trivial, qemu-devel

On Thu, Jun 13, 2013 at 06:51:49PM +0800, Hu Tao wrote:
> Since it's called in object_initialize_with_type later.
> 
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
>  qom/object.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index 803b94b..38dc45e 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -406,9 +406,6 @@ Object *object_new_with_type(Type type)
>  {
>      Object *obj;
>  
> -    g_assert(type != NULL);
> -    type_initialize(type);
> -
>      obj = g_malloc(type->instance_size);

Well, type->instance_size has to be initialized before this.

>      object_initialize_with_type(obj, type);
>      obj->free = g_free;
> -- 
> 1.8.2.3
> 

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

* [Qemu-devel] [PATCH v2] piix: fix some printf errors when debug is enabled
  2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
  2013-06-13 11:13   ` Andreas Färber
  2013-06-14  6:52   ` Hu Tao
@ 2013-06-14  7:11   ` Hu Tao
  2013-06-14  7:19     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  2013-06-14 10:27     ` Michael Tokarev
  2 siblings, 2 replies; 16+ messages in thread
From: Hu Tao @ 2013-06-14  7:11 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial

And use PRIxxx macros if possible.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
 cputlb.c        |  4 ++--
 hw/acpi/piix4.c | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cputlb.c b/cputlb.c
index 86666c8..1230e9e 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
 
 #if defined(DEBUG_TLB)
     printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
-           " prot=%x idx=%d pd=0x%08lx\n",
-           vaddr, paddr, prot, mmu_idx, pd);
+           " prot=%x idx=%d\n",
+           vaddr, paddr, prot, mmu_idx);
 #endif
 
     address = vaddr;
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index e6525ac..756df3b 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -518,7 +518,7 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, unsigned width)
     PIIX4PMState *s = opaque;
     uint32_t val = acpi_gpe_ioport_readb(&s->ar, addr);
 
-    PIIX4_DPRINTF("gpe read %x == %x\n", addr, val);
+    PIIX4_DPRINTF("gpe read %" HWADDR_PRIx " == %" PRIu32 "\n", addr, val);
     return val;
 }
 
@@ -530,7 +530,7 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint64_t val,
     acpi_gpe_ioport_writeb(&s->ar, addr, val);
     pm_update_sci(s);
 
-    PIIX4_DPRINTF("gpe write %x <== %d\n", addr, val);
+    PIIX4_DPRINTF("gpe write %" HWADDR_PRIx " <== %" PRIu64 "\n", addr, val);
 }
 
 static const MemoryRegionOps piix4_gpe_ops = {
@@ -553,15 +553,15 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
         /* Manufacture an "up" value to cause a device check on any hotplug
          * slot with a device.  Extra device checks are harmless. */
         val = s->pci0_slot_device_present & s->pci0_hotplug_enable;
-        PIIX4_DPRINTF("pci_up_read %x\n", val);
+        PIIX4_DPRINTF("pci_up_read %" PRIu32 "\n", val);
         break;
     case PCI_DOWN_BASE - PCI_HOTPLUG_ADDR:
         val = s->pci0_status.down;
-        PIIX4_DPRINTF("pci_down_read %x\n", val);
+        PIIX4_DPRINTF("pci_down_read %" PRIu32 "\n", val);
         break;
     case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
         /* No feature defined yet */
-        PIIX4_DPRINTF("pci_features_read %x\n", val);
+        PIIX4_DPRINTF("pci_features_read %" PRIu32 "\n", val);
         break;
     case PCI_RMV_BASE - PCI_HOTPLUG_ADDR:
         val = s->pci0_hotplug_enable;
@@ -579,7 +579,7 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
     switch (addr) {
     case PCI_EJ_BASE - PCI_HOTPLUG_ADDR:
         acpi_piix_eject_slot(opaque, (uint32_t)data);
-        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== % " PRIu64 "\n",
+        PIIX4_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
                       addr, data);
         break;
     default:
-- 
1.8.2.3

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] piix: fix some printf errors when debug is enabled
  2013-06-14  7:11   ` [Qemu-devel] [PATCH v2] piix: " Hu Tao
@ 2013-06-14  7:19     ` Michael Tokarev
  2013-06-14 10:27     ` Michael Tokarev
  1 sibling, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2013-06-14  7:19 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, Blue Swirl, qemu-devel

14.06.2013 11:11, Hu Tao wrote:
> And use PRIxxx macros if possible.
> 
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
>  cputlb.c        |  4 ++--
>  hw/acpi/piix4.c | 12 ++++++------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/cputlb.c b/cputlb.c
> index 86666c8..1230e9e 100644
> --- a/cputlb.c
> +++ b/cputlb.c
> @@ -262,8 +262,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
>  
>  #if defined(DEBUG_TLB)
>      printf("tlb_set_page: vaddr=" TARGET_FMT_lx " paddr=0x" TARGET_FMT_plx
> -           " prot=%x idx=%d pd=0x%08lx\n",
> -           vaddr, paddr, prot, mmu_idx, pd);
> +           " prot=%x idx=%d\n",
> +           vaddr, paddr, prot, mmu_idx);
>  #endif

This one hunk has already been posted by Hervé Poussineau in this message:

From: Hervé Poussineau <hpoussin@reactos.org>
Date: Wed,  5 Jun 2013 20:16:42 +0800
Message-Id: <1370434603-5394-1-git-send-email-hpoussin@reactos.org>
Subject: [Qemu-trivial] [PATCH] cputlb: fix debug logs

I questioned it because the `pd' thing hasn't been really removed
but moved into a different structure instead, and we should either
ask subsystem maintainers to fix it or remove the whole thing.
This is debugging stuff, which is needed by someone who actually
understands the subsystem and understands the debugging output
too.  If the debugging isn't needed (and since it does not compile
for quite some time, it obviously isn't used), let's get rid of
whole thing instead.

Unfortunately no one replied to that my email so far.  Adding Cc
BlueSwirl again, in a hope...

Thanks,

/mjt

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] piix: fix some printf errors when debug is enabled
  2013-06-14  7:11   ` [Qemu-devel] [PATCH v2] piix: " Hu Tao
  2013-06-14  7:19     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2013-06-14 10:27     ` Michael Tokarev
  2013-06-17  2:09       ` Hu Tao
  1 sibling, 1 reply; 16+ messages in thread
From: Michael Tokarev @ 2013-06-14 10:27 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

14.06.2013 11:11, Hu Tao wrote:
> And use PRIxxx macros if possible.

Thanks, applied to the trivial patches queue, on top of the patch
by Hervé Poussineau which I mentioned before.

/mjt

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

* Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type
  2013-06-13 10:51 ` [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type Hu Tao
  2013-06-14  7:09   ` Hu Tao
@ 2013-06-14 13:02   ` Peter Crosthwaite
  1 sibling, 0 replies; 16+ messages in thread
From: Peter Crosthwaite @ 2013-06-14 13:02 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

Hi Hu,

On Thu, Jun 13, 2013 at 8:51 PM, Hu Tao <hutao@cn.fujitsu.com> wrote:
> Since it's called in object_initialize_with_type later.
>
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
>  qom/object.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 803b94b..38dc45e 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -406,9 +406,6 @@ Object *object_new_with_type(Type type)
>  {
>      Object *obj;
>
> -    g_assert(type != NULL);
> -    type_initialize(type);
> -
>      obj = g_malloc(type->instance_size);

type->instance_size may be lazily set by type_initilize, so I think
this malloc will break for classes that inherit their instance size.
Some relevant code (qom/object.c):

228 static void type_initialize(TypeImpl *ti)
 229 {
[snip]
 236     ti->class_size = type_class_get_size(ti);
 237     ti->instance_size = type_object_get_size(ti);

 176 static size_t type_object_get_size(TypeImpl *ti)
 177 {
 178     if (ti->instance_size) {
 179         return ti->instance_size;
 180     }
 181
 182     if (type_has_parent(ti)) {
 183         return type_object_get_size(type_get_parent(ti));
 184     }
 185
 186     return 0;
 187 }

Regards,
Peter

>      object_initialize_with_type(obj, type);
>      obj->free = g_free;
> --
> 1.8.2.3
>
>

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

* Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type
  2013-06-14  7:09   ` Hu Tao
@ 2013-06-14 13:06     ` Peter Crosthwaite
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Crosthwaite @ 2013-06-14 13:06 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, qemu-devel

On Fri, Jun 14, 2013 at 5:09 PM, Hu Tao <hutao@cn.fujitsu.com> wrote:
> On Thu, Jun 13, 2013 at 06:51:49PM +0800, Hu Tao wrote:
>> Since it's called in object_initialize_with_type later.
>>
>> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
>> ---
>>  qom/object.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index 803b94b..38dc45e 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -406,9 +406,6 @@ Object *object_new_with_type(Type type)
>>  {
>>      Object *obj;
>>
>> -    g_assert(type != NULL);
>> -    type_initialize(type);
>> -
>>      obj = g_malloc(type->instance_size);
>
> Well, type->instance_size has to be initialized before this.
>

Missed this reply. Thanks for catching. Sorry for the noise.

Regards,
Peter

>>      object_initialize_with_type(obj, type);
>>      obj->free = g_free;
>> --
>> 1.8.2.3
>>
>

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

* Re: [Qemu-devel] [PATCH] fix typo: apci -> acpi
  2013-06-13 11:05   ` Andreas Färber
@ 2013-06-17  2:08     ` Hu Tao
  2013-06-17  6:20       ` Michael Tokarev
  0 siblings, 1 reply; 16+ messages in thread
From: Hu Tao @ 2013-06-17  2:08 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-trivial, Andreas Färber, qemu-devel

Michael,

On Thu, Jun 13, 2013 at 01:05:10PM +0200, Andreas Färber wrote:
> Am 13.06.2013 12:51, schrieb Hu Tao:
> > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> > ---
> >  hw/acpi/ich9.c  | 4 ++--
> >  hw/acpi/piix4.c | 6 +++---
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>

Would you like to pick up this one?


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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] piix: fix some printf errors when debug is enabled
  2013-06-14 10:27     ` Michael Tokarev
@ 2013-06-17  2:09       ` Hu Tao
  0 siblings, 0 replies; 16+ messages in thread
From: Hu Tao @ 2013-06-17  2:09 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel

On Fri, Jun 14, 2013 at 02:27:38PM +0400, Michael Tokarev wrote:
> 14.06.2013 11:11, Hu Tao wrote:
> > And use PRIxxx macros if possible.
> 
> Thanks, applied to the trivial patches queue, on top of the patch
> by Hervé Poussineau which I mentioned before.
> 
> /mjt

Thanks!


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

* Re: [Qemu-devel] [PATCH] fix typo: apci -> acpi
  2013-06-17  2:08     ` Hu Tao
@ 2013-06-17  6:20       ` Michael Tokarev
  0 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2013-06-17  6:20 UTC (permalink / raw)
  To: Hu Tao; +Cc: qemu-trivial, Andreas Färber, qemu-devel

17.06.2013 06:08, Hu Tao wrote:
> Michael,
> 
> On Thu, Jun 13, 2013 at 01:05:10PM +0200, Andreas Färber wrote:
>> Am 13.06.2013 12:51, schrieb Hu Tao:
>>> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
>>> ---
>>>  hw/acpi/ich9.c  | 4 ++--
>>>  hw/acpi/piix4.c | 6 +++---
>>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> Would you like to pick up this one?

Yes I will, together with a bunch of other patches
posted to -trivial.  This patch was a bit too late
for previous week pull so it missed that.

Thanks,

/mjt

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

end of thread, other threads:[~2013-06-17  6:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 10:51 [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Hu Tao
2013-06-13 10:51 ` [Qemu-devel] [PATCH] fix typo: apci -> acpi Hu Tao
2013-06-13 11:05   ` Andreas Färber
2013-06-17  2:08     ` Hu Tao
2013-06-17  6:20       ` Michael Tokarev
2013-06-13 10:51 ` [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type Hu Tao
2013-06-14  7:09   ` Hu Tao
2013-06-14 13:06     ` Peter Crosthwaite
2013-06-14 13:02   ` Peter Crosthwaite
2013-06-13 11:10 ` [Qemu-devel] [PATCH] fix some printf errors when debug is enabled Andreas Färber
2013-06-13 11:13   ` Andreas Färber
2013-06-14  6:52   ` Hu Tao
2013-06-14  7:11   ` [Qemu-devel] [PATCH v2] piix: " Hu Tao
2013-06-14  7:19     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-06-14 10:27     ` Michael Tokarev
2013-06-17  2:09       ` Hu Tao

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).