qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 12/17] spapr: Don't use weird units for MIN_RMA_SLOF


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v7 12/17] spapr: Don't use weird units for MIN_RMA_SLOF
Date: Thu, 5 Mar 2020 09:39:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

(sorry I missed that due to the change of series cover subject, I was tracking "Fixes for RMA size calculation​")

On 3/3/20 4:43 AM, David Gibson wrote:
MIN_RMA_SLOF records the minimum about of RMA that the SLOF firmware
requires.  It lets us give a meaningful error if the RMA ends up too small,
rather than just letting SLOF crash.

It's currently stored as a number of megabytes, which is strange for global
constants.  Move that megabyte scaling into the definition of the constant
like most other things use.

Change from M to MiB in the associated message while we're at it.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
---
  hw/ppc/spapr.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index cc10798be4..510494ad87 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -103,7 +103,7 @@
  #define FW_OVERHEAD             0x2800000
  #define KERNEL_LOAD_ADDR        FW_MAX_SIZE
-#define MIN_RMA_SLOF 128UL
+#define MIN_RMA_SLOF            (128 * MiB)
#define PHANDLE_INTC 0x00001111 @@ -2956,10 +2956,10 @@ static void spapr_machine_init(MachineState *machine)
          }
      }
- if (spapr->rma_size < (MIN_RMA_SLOF * MiB)) {
+    if (spapr->rma_size < MIN_RMA_SLOF) {
          error_report(
-            "pSeries SLOF firmware requires >= %ldM guest RMA (Real Mode Area 
memory)",
-            MIN_RMA_SLOF);
+            "pSeries SLOF firmware requires >= %ldMiB guest RMA (Real Mode Area 
memory)",
+            MIN_RMA_SLOF / MiB);
          exit(1);
      }

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]