qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/4] Trivial patches
@ 2012-12-04  6:04 Peter Crosthwaite
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg Peter Crosthwaite
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Peter Crosthwaite @ 2012-12-04  6:04 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: peter.maydell, Peter Crosthwaite

My trivial patches from during the freeze.

Peter Crosthwaite (4):
  pflash_cfi01: qemu_log_mask "unimplemented" msg
  pflash_cfi0x: Send debug messages to stderr
  zynq_slcr: Compile time warning fixes.
  arm_gic: Add cpu nr to Raised IRQ message

 hw/arm_gic.c      |    2 +-
 hw/pflash_cfi01.c |   14 +++++++-------
 hw/pflash_cfi02.c |    6 +++---
 hw/zynq_slcr.c    |    7 ++++---
 4 files changed, 15 insertions(+), 14 deletions(-)

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

* [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg
  2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
@ 2012-12-04  6:04 ` Peter Crosthwaite
  2012-12-04 18:18   ` Peter Maydell
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr Peter Crosthwaite
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Peter Crosthwaite @ 2012-12-04  6:04 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: peter.maydell, Peter Crosthwaite

This printf is informing the user of unimplemented functionality. It should be
re-directed to qemu_log(LOG_UNIMP, ...) accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/pflash_cfi01.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
index 7d040b5..f9f8e5d 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -438,9 +438,9 @@ static void pflash_write(pflash_t *pfl, hwaddr offset,
     return;
 
  error_flash:
-    printf("%s: Unimplemented flash cmd sequence "
-           "(offset " TARGET_FMT_plx ", wcycle 0x%x cmd 0x%x value 0x%x)\n",
-           __func__, offset, pfl->wcycle, pfl->cmd, value);
+    qemu_log_mask(LOG_UNIMP, "%s: Unimplemented flash cmd sequence "
+                  "(offset " TARGET_FMT_plx ", wcycle 0x%x cmd 0x%x value 0x%x)"
+                  "\n", __func__, offset, pfl->wcycle, pfl->cmd, value);
 
  reset_flash:
     memory_region_rom_device_set_readable(&pfl->mem, true);
-- 
1.7.0.4

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

* [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr
  2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg Peter Crosthwaite
@ 2012-12-04  6:04 ` Peter Crosthwaite
  2012-12-04 18:19   ` Peter Maydell
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes Peter Crosthwaite
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Peter Crosthwaite @ 2012-12-04  6:04 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: peter.maydell, Peter Crosthwaite

These debug info messages should go to stderr rather than stdout.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/pflash_cfi01.c |    8 ++++----
 hw/pflash_cfi02.c |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
index f9f8e5d..931264f 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -46,15 +46,15 @@
 
 #define PFLASH_BUG(fmt, ...) \
 do { \
-    printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
+    fprintf(stderr, "PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
     exit(1); \
 } while(0)
 
 /* #define PFLASH_DEBUG */
 #ifdef PFLASH_DEBUG
-#define DPRINTF(fmt, ...)                          \
-do {                                               \
-    printf("PFLASH: " fmt , ## __VA_ARGS__);       \
+#define DPRINTF(fmt, ...)                                   \
+do {                                                        \
+    fprintf(stderr, "PFLASH: " fmt , ## __VA_ARGS__);       \
 } while (0)
 #else
 #define DPRINTF(fmt, ...) do { } while (0)
diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index f918e36..c60ae83 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -45,9 +45,9 @@
 
 //#define PFLASH_DEBUG
 #ifdef PFLASH_DEBUG
-#define DPRINTF(fmt, ...)                          \
-do {                                               \
-    printf("PFLASH: " fmt , ## __VA_ARGS__);       \
+#define DPRINTF(fmt, ...)                                  \
+do {                                                       \
+    fprintf(stderr "PFLASH: " fmt , ## __VA_ARGS__);       \
 } while (0)
 #else
 #define DPRINTF(fmt, ...) do { } while (0)
-- 
1.7.0.4

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

* [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes.
  2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg Peter Crosthwaite
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr Peter Crosthwaite
@ 2012-12-04  6:04 ` Peter Crosthwaite
  2012-12-04 18:19   ` Peter Maydell
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message Peter Crosthwaite
  2012-12-18 15:51 ` [Qemu-devel] [Qemu-trivial] [PATCH v1 0/4] Trivial patches Stefan Hajnoczi
  4 siblings, 1 reply; 10+ messages in thread
From: Peter Crosthwaite @ 2012-12-04  6:04 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: peter.maydell, Peter Crosthwaite

Few warnings when compiled with debug printfs enabled. Fixed all.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/zynq_slcr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/zynq_slcr.c b/hw/zynq_slcr.c
index dde4306..f55ab8d 100644
--- a/hw/zynq_slcr.c
+++ b/hw/zynq_slcr.c
@@ -334,7 +334,7 @@ static uint64_t zynq_slcr_read(void *opaque, hwaddr offset,
 {
     uint32_t ret = zynq_slcr_read_imp(opaque, offset);
 
-    DB_PRINT("addr: %08x data: %08x\n", offset, ret);
+    DB_PRINT("addr: %08x data: %08x\n", (unsigned)offset, (unsigned)ret);
     return ret;
 }
 
@@ -343,7 +343,7 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
 {
     ZynqSLCRState *s = (ZynqSLCRState *)opaque;
 
-    DB_PRINT("offset: %08x data: %08x\n", offset, (unsigned)val);
+    DB_PRINT("offset: %08x data: %08x\n", (unsigned)offset, (unsigned)val);
 
     switch (offset) {
     case 0x00: /* SCL */
@@ -476,7 +476,8 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
             break;
         default:
         bad_reg:
-            DB_PRINT("Bad register write %x <= %08x\n", (int)offset, val);
+            DB_PRINT("Bad register write %x <= %08x\n", (int)offset,
+                     (unsigned)val);
         }
     } else {
         DB_PRINT("SCLR registers are locked. Unlock them first\n");
-- 
1.7.0.4

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

* [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message
  2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
                   ` (2 preceding siblings ...)
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes Peter Crosthwaite
@ 2012-12-04  6:04 ` Peter Crosthwaite
  2012-12-04 18:20   ` Peter Maydell
  2012-12-18 15:51 ` [Qemu-devel] [Qemu-trivial] [PATCH v1 0/4] Trivial patches Stefan Hajnoczi
  4 siblings, 1 reply; 10+ messages in thread
From: Peter Crosthwaite @ 2012-12-04  6:04 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: peter.maydell, Peter Crosthwaite

Add the relevant CPU nr to this debug message to make IRQ debugging more
informative.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/arm_gic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/arm_gic.c b/hw/arm_gic.c
index f9e423f..7a10188 100644
--- a/hw/arm_gic.c
+++ b/hw/arm_gic.c
@@ -76,7 +76,7 @@ void gic_update(GICState *s)
         if (best_prio <= s->priority_mask[cpu]) {
             s->current_pending[cpu] = best_irq;
             if (best_prio < s->running_priority[cpu]) {
-                DPRINTF("Raised pending IRQ %d\n", best_irq);
+                DPRINTF("Raised pending IRQ %d (cpu %d)\n", best_irq, cpu);
                 level = 1;
             }
         }
-- 
1.7.0.4

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

* Re: [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg Peter Crosthwaite
@ 2012-12-04 18:18   ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2012-12-04 18:18 UTC (permalink / raw)
  To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel

On 4 December 2012 06:04, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> This printf is informing the user of unimplemented functionality. It should be
> re-directed to qemu_log(LOG_UNIMP, ...) accordingly.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I'm going to assume this series will go through -trivial
rather than arm-devs.

-- PMM

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

* Re: [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr Peter Crosthwaite
@ 2012-12-04 18:19   ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2012-12-04 18:19 UTC (permalink / raw)
  To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel

On 4 December 2012 06:04, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> These debug info messages should go to stderr rather than stdout.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes.
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes Peter Crosthwaite
@ 2012-12-04 18:19   ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2012-12-04 18:19 UTC (permalink / raw)
  To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel

On 4 December 2012 06:04, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Few warnings when compiled with debug printfs enabled. Fixed all.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message Peter Crosthwaite
@ 2012-12-04 18:20   ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2012-12-04 18:20 UTC (permalink / raw)
  To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel

On 4 December 2012 06:04, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Add the relevant CPU nr to this debug message to make IRQ debugging more
> informative.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v1 0/4] Trivial patches
  2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
                   ` (3 preceding siblings ...)
  2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message Peter Crosthwaite
@ 2012-12-18 15:51 ` Stefan Hajnoczi
  4 siblings, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2012-12-18 15:51 UTC (permalink / raw)
  To: Peter Crosthwaite; +Cc: qemu-trivial, peter.maydell, qemu-devel

On Tue, Dec 04, 2012 at 04:04:32PM +1000, Peter Crosthwaite wrote:
> My trivial patches from during the freeze.
> 
> Peter Crosthwaite (4):
>   pflash_cfi01: qemu_log_mask "unimplemented" msg
>   pflash_cfi0x: Send debug messages to stderr
>   zynq_slcr: Compile time warning fixes.
>   arm_gic: Add cpu nr to Raised IRQ message
> 
>  hw/arm_gic.c      |    2 +-
>  hw/pflash_cfi01.c |   14 +++++++-------
>  hw/pflash_cfi02.c |    6 +++---
>  hw/zynq_slcr.c    |    7 ++++---
>  4 files changed, 15 insertions(+), 14 deletions(-)
> 
> 

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

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

end of thread, other threads:[~2012-12-18 15:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04  6:04 [Qemu-devel] [PATCH v1 0/4] Trivial patches Peter Crosthwaite
2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 1/4] pflash_cfi01: qemu_log_mask "unimplemented" msg Peter Crosthwaite
2012-12-04 18:18   ` Peter Maydell
2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 2/4] pflash_cfi0x: Send debug messages to stderr Peter Crosthwaite
2012-12-04 18:19   ` Peter Maydell
2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 3/4] zynq_slcr: Compile time warning fixes Peter Crosthwaite
2012-12-04 18:19   ` Peter Maydell
2012-12-04  6:04 ` [Qemu-devel] [PATCH v1 4/4] arm_gic: Add cpu nr to Raised IRQ message Peter Crosthwaite
2012-12-04 18:20   ` Peter Maydell
2012-12-18 15:51 ` [Qemu-devel] [Qemu-trivial] [PATCH v1 0/4] Trivial patches Stefan Hajnoczi

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