qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ppc/pnv: PNOR cleanups
@ 2020-01-08  9:03 Cédric Le Goater
  2020-01-08  9:03 ` [PATCH 1/2] ppc/pnv: use QEMU unit definition MiB Cédric Le Goater
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Cédric Le Goater @ 2020-01-08  9:03 UTC (permalink / raw)
  To: David Gibson
  Cc: qemu-ppc, Philippe Mathieu-Daudé, qemu-devel,
	Cédric Le Goater

Hello,

Here are small cleanups of the PnvPNOR model.

Thanks,

C.

Cédric Le Goater (2):
  ppc/pnv: use QEMU unit definition MiB
  ppc/pnv: improve error logging when a PNOR update fails

 hw/ppc/pnv_pnor.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.21.1



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

* [PATCH 1/2] ppc/pnv: use QEMU unit definition MiB
  2020-01-08  9:03 [PATCH 0/2] ppc/pnv: PNOR cleanups Cédric Le Goater
@ 2020-01-08  9:03 ` Cédric Le Goater
  2020-01-08  9:03 ` [PATCH 2/2] ppc/pnv: improve error logging when a PNOR update fails Cédric Le Goater
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Cédric Le Goater @ 2020-01-08  9:03 UTC (permalink / raw)
  To: David Gibson
  Cc: qemu-ppc, Philippe Mathieu-Daudé, qemu-devel,
	Cédric Le Goater

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv_pnor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c
index b061106d1c0c..08ea3e381f2b 100644
--- a/hw/ppc/pnv_pnor.c
+++ b/hw/ppc/pnv_pnor.c
@@ -11,6 +11,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
+#include "qemu/units.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/loader.h"
@@ -111,7 +112,7 @@ static void pnv_pnor_realize(DeviceState *dev, Error **errp)
 }
 
 static Property pnv_pnor_properties[] = {
-    DEFINE_PROP_INT64("size", PnvPnor, size, 128 << 20),
+    DEFINE_PROP_INT64("size", PnvPnor, size, 128 * MiB),
     DEFINE_PROP_DRIVE("drive", PnvPnor, blk),
     DEFINE_PROP_END_OF_LIST(),
 };
-- 
2.21.1



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

* [PATCH 2/2] ppc/pnv: improve error logging when a PNOR update fails
  2020-01-08  9:03 [PATCH 0/2] ppc/pnv: PNOR cleanups Cédric Le Goater
  2020-01-08  9:03 ` [PATCH 1/2] ppc/pnv: use QEMU unit definition MiB Cédric Le Goater
@ 2020-01-08  9:03 ` Cédric Le Goater
  2020-01-08  9:30 ` [PATCH 0/2] ppc/pnv: PNOR cleanups Philippe Mathieu-Daudé
  2020-01-09  2:29 ` David Gibson
  3 siblings, 0 replies; 5+ messages in thread
From: Cédric Le Goater @ 2020-01-08  9:03 UTC (permalink / raw)
  To: David Gibson
  Cc: qemu-ppc, Philippe Mathieu-Daudé, qemu-devel,
	Cédric Le Goater

Print out the offset at which the error occured.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv_pnor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c
index 08ea3e381f2b..2ab35b797b58 100644
--- a/hw/ppc/pnv_pnor.c
+++ b/hw/ppc/pnv_pnor.c
@@ -47,7 +47,8 @@ static void pnv_pnor_update(PnvPnor *s, int offset, int size)
     ret = blk_pwrite(s->blk, offset, s->storage + offset,
                      offset_end - offset, 0);
     if (ret < 0) {
-        error_report("Could not update PNOR: %s", strerror(-ret));
+        error_report("Could not update PNOR offset=0x%" PRIx32" : %s", offset,
+                     strerror(-ret));
     }
 }
 
-- 
2.21.1



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

* Re: [PATCH 0/2] ppc/pnv: PNOR cleanups
  2020-01-08  9:03 [PATCH 0/2] ppc/pnv: PNOR cleanups Cédric Le Goater
  2020-01-08  9:03 ` [PATCH 1/2] ppc/pnv: use QEMU unit definition MiB Cédric Le Goater
  2020-01-08  9:03 ` [PATCH 2/2] ppc/pnv: improve error logging when a PNOR update fails Cédric Le Goater
@ 2020-01-08  9:30 ` Philippe Mathieu-Daudé
  2020-01-09  2:29 ` David Gibson
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-08  9:30 UTC (permalink / raw)
  To: Cédric Le Goater, David Gibson; +Cc: qemu-ppc, qemu-devel

On 1/8/20 10:03 AM, Cédric Le Goater wrote:
> Hello,
> 
> Here are small cleanups of the PnvPNOR model.
> 
> Thanks,
> 
> C.
> 
> Cédric Le Goater (2):
>    ppc/pnv: use QEMU unit definition MiB
>    ppc/pnv: improve error logging when a PNOR update fails
> 
>   hw/ppc/pnv_pnor.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)

Thanks for the respin.

Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH 0/2] ppc/pnv: PNOR cleanups
  2020-01-08  9:03 [PATCH 0/2] ppc/pnv: PNOR cleanups Cédric Le Goater
                   ` (2 preceding siblings ...)
  2020-01-08  9:30 ` [PATCH 0/2] ppc/pnv: PNOR cleanups Philippe Mathieu-Daudé
@ 2020-01-09  2:29 ` David Gibson
  3 siblings, 0 replies; 5+ messages in thread
From: David Gibson @ 2020-01-09  2:29 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: qemu-ppc, Philippe Mathieu-Daudé, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

On Wed, Jan 08, 2020 at 10:03:46AM +0100, Cédric Le Goater wrote:
> Hello,
> 
> Here are small cleanups of the PnvPNOR model.

Applied to ppc-for-5.0, thanks.

> 
> Thanks,
> 
> C.
> 
> Cédric Le Goater (2):
>   ppc/pnv: use QEMU unit definition MiB
>   ppc/pnv: improve error logging when a PNOR update fails
> 
>  hw/ppc/pnv_pnor.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-01-09  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-08  9:03 [PATCH 0/2] ppc/pnv: PNOR cleanups Cédric Le Goater
2020-01-08  9:03 ` [PATCH 1/2] ppc/pnv: use QEMU unit definition MiB Cédric Le Goater
2020-01-08  9:03 ` [PATCH 2/2] ppc/pnv: improve error logging when a PNOR update fails Cédric Le Goater
2020-01-08  9:30 ` [PATCH 0/2] ppc/pnv: PNOR cleanups Philippe Mathieu-Daudé
2020-01-09  2:29 ` David Gibson

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