[Qemu-devel] [PATCH v2 3/3] ppc/pnv: use IEC binary prefixes to represent sizes

Murilo Opsfelder Araujo posted 3 patches 6 years, 8 months ago
Maintainers: David Gibson <david@gibson.dropbear.id.au>
[Qemu-devel] [PATCH v2 3/3] ppc/pnv: use IEC binary prefixes to represent sizes
Posted by Murilo Opsfelder Araujo 6 years, 8 months ago
Using IEC binary prefixes from qemu/units.h provides a more human-friendly value
to size constants.

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
---
 hw/ppc/pnv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index c308ae423a..b6c5d1eff9 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -47,11 +47,11 @@
 
 #include <libfdt.h>
 
-#define FDT_MAX_SIZE            0x00100000
+#define FDT_MAX_SIZE            (1 * MiB)
 
 #define FW_FILE_NAME            "skiboot.lid"
 #define FW_LOAD_ADDR            0x0
-#define FW_MAX_SIZE             0x00400000
+#define FW_MAX_SIZE             (4 * MiB)
 
 #define KERNEL_LOAD_ADDR        0x20000000
 #define KERNEL_MAX_SIZE         (256 * MiB)
-- 
2.20.1


Re: [Qemu-devel] [PATCH v2 3/3] ppc/pnv: use IEC binary prefixes to represent sizes
Posted by Cédric Le Goater 6 years, 8 months ago
On 2/25/19 6:01 PM, Murilo Opsfelder Araujo wrote:
> Using IEC binary prefixes from qemu/units.h provides a more human-friendly value
> to size constants.
> 
> Suggested-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>



Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  hw/ppc/pnv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index c308ae423a..b6c5d1eff9 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -47,11 +47,11 @@
>  
>  #include <libfdt.h>
>  
> -#define FDT_MAX_SIZE            0x00100000
> +#define FDT_MAX_SIZE            (1 * MiB)
>  
>  #define FW_FILE_NAME            "skiboot.lid"
>  #define FW_LOAD_ADDR            0x0
> -#define FW_MAX_SIZE             0x00400000
> +#define FW_MAX_SIZE             (4 * MiB)
>  
>  #define KERNEL_LOAD_ADDR        0x20000000
>  #define KERNEL_MAX_SIZE         (256 * MiB)
>