ppc/pnv: PNOR cleanups
cover ppc/pnv: PNOR cleanups
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(-)
Signature · 1 line
2.21.1
PATCH 1/2 ppc/pnv: use QEMU unit definition MiB
--- hw/ppc/pnv_pnor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/ppc/pnv_pnor.c +2 -1
@@ -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 (), };
Signature · 1 line
2.21.1
PATCH 2/2 ppc/pnv: improve error logging when a PNOR update fails
In reply to Cédric Le GoaterPrint out the offset at which the error occured.
--- hw/ppc/pnv_pnor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/ppc/pnv_pnor.c +2 -1
@@ -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)); } }
Signature · 1 line
2.21.1
Quoted 6 lines · Cédric Le Goater
Hello,
Here are small cleanups of the PnvPNOR model.
Thanks,
Quoted 8 lines
C.
Cédric Le Goater (2):
ppc/pnv: use QEMU unit definition MiB
ppc/pnv: improve error logging when a PNOR update failshw/ppc/pnv_pnor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Thanks for the respin.
Series:
David Gibson
AppliedQuoted 3 lines · Cédric Le Goater
Hello,
Here are small cleanups of the PnvPNOR model.
Applied to ppc-for-5.0, thanks.
Quoted 12 lines
Thanks,
C.
Cédric Le Goater (2):
ppc/pnv: use QEMU unit definition MiB
ppc/pnv: improve error logging when a PNOR update failshw/ppc/pnv_pnor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 4 lines
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