From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Peter.Chubb@data61.csiro.au, peter.maydell@linaro.org,
qemu-arm@nongnu.org, peter.chubb@nicta.com.au,
qemu-devel@nongnu.org
Subject: Re: [PATCH v3 18/86] arm:kzm: drop RAM size fixup
Date: Fri, 17 Jan 2020 10:50:33 +0100 [thread overview]
Message-ID: <20200117105033.6801593a@redhat.com> (raw)
In-Reply-To: <dc8d8594-0bf8-e6c2-9ce8-94bf5361bca3@redhat.com>
On Thu, 16 Jan 2020 19:22:08 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> On 1/16/20 6:26 PM, Igor Mammedov wrote:
> > If the user provided too large a RAM size, the code used to
> > complain and trim it to the max size. Now tht RAM is allocated by
> > generic code, that's no longer possible, so generate an error and
> > exit instead.
> >
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > v3:
> > * rephrase commit message in nicer way
> > ("Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>)
> > * reword error message and use size_to_str() to pretty print suggested size
> > ("Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>)
> >
> > CC: peter.chubb@nicta.com.au
> > CC: peter.maydell@linaro.org
> > CC: qemu-arm@nongnu.org
> > ---
> > hw/arm/kzm.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
> > index 1d5ef28..94cbac1 100644
> > --- a/hw/arm/kzm.c
> > +++ b/hw/arm/kzm.c
> > @@ -25,6 +25,7 @@
> > #include "hw/char/serial.h"
> > #include "sysemu/qtest.h"
> > #include "sysemu/sysemu.h"
> > +#include "qemu/cutils.h"
> >
> > /* Memory map for Kzm Emulation Baseboard:
> > * 0x00000000-0x7fffffff See i.MX31 SOC for support
> > @@ -78,10 +79,10 @@ static void kzm_init(MachineState *machine)
> >
> > /* Check the amount of memory is compatible with the SOC */
> > if (machine->ram_size > (FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE)) {
> > - warn_report("RAM size " RAM_ADDR_FMT " above max supported, "
> > - "reduced to %x", machine->ram_size,
> > - FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE);
> > - machine->ram_size = FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE;
> > + char *sz = size_to_str(FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE);
> > + error_report("RAM size more than %s is not supported", sz);
>
> Yay! Can you use this pattern the other patches too?
I plan to, as it's much neater and I can avoid adding RAM_ADDR_FMT
Would your acks still stand or should I drop your Reviewed-bys
on changed in such way patches?
> You might want to add:
>
> #define FSL_IMX31_SDRAM_SIZE_MAX \
> (FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE)
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> > + g_free(sz);
> > + exit(EXIT_FAILURE);
> > }
> >
> > memory_region_allocate_system_memory(&s->ram, NULL, "kzm.ram",
> >
>
next prev parent reply other threads:[~2020-01-17 9:50 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1579100861-73692-1-git-send-email-imammedo@redhat.com>
2020-01-15 15:06 ` [PATCH v2 07/86] arm:aspeed: convert valid RAM sizes to data Igor Mammedov
2020-01-16 1:45 ` Joel Stanley
2020-01-15 15:06 ` [PATCH v2 08/86] arm:aspeed: actually check RAM size Igor Mammedov
2020-01-16 8:41 ` Cédric Le Goater
2020-01-16 17:35 ` Igor Mammedov
2020-01-17 7:56 ` Cédric Le Goater
2020-01-20 14:21 ` [PATCH v3 07/84] hw/arm/aspeed: " Igor Mammedov
2020-01-20 15:33 ` Cédric Le Goater
2020-01-15 15:06 ` [PATCH v2 09/86] hw:aspeed: drop warning and bogus ram_size fixup Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 10/86] arm:aspeed: use memdev for RAM Igor Mammedov
2020-01-15 19:19 ` Philippe Mathieu-Daudé
2020-01-16 9:24 ` Cédric Le Goater
2020-01-16 18:17 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 11/86] arm:collie: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 12/86] arm:cubieboard: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 13/86] arm:digic_boards: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 14/86] arm:highbank: " Igor Mammedov
2020-01-15 19:18 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 15/86] arm:imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 16/86] arm:imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-15 19:18 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 17/86] arm:integratorcp: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 18/86] arm:kzm: drop RAM size fixup Igor Mammedov
2020-01-15 19:58 ` Chubb, Peter (Data61, Kensington NSW)
2020-01-16 17:26 ` [PATCH v3 " Igor Mammedov
2020-01-16 18:22 ` Philippe Mathieu-Daudé
2020-01-17 9:50 ` Igor Mammedov [this message]
2020-01-17 13:07 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 19/86] arm:kzm: use memdev for RAM Igor Mammedov
2020-01-15 20:09 ` Chubb, Peter (Data61, Kensington NSW)
2020-01-15 15:06 ` [PATCH v2 20/86] arm:mcimx6ul-evk: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 21/86] arm:mcimx7d-sabre: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 22/86] arm:mps2-tz: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 23/86] arm:mps2: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 24/86] arm:musicpal: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 25/86] arm:nseries: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 26/86] arm:omap_sx1: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 27/86] arm:palm: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 28/86] arm:raspi: " Igor Mammedov
2020-01-15 19:07 ` Philippe Mathieu-Daudé
2020-01-16 16:55 ` Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 29/86] arm:sabrelite: " Igor Mammedov
2020-01-15 15:06 ` [PATCH v2 30/86] arm:sbsa-ref: " Igor Mammedov
2020-01-15 19:09 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 31/86] arm:versatilepb: " Igor Mammedov
2020-01-15 19:20 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 32/86] arm:vexpress: " Igor Mammedov
2020-01-15 19:21 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 33/86] arm:virt: " Igor Mammedov
2020-01-15 18:57 ` Philippe Mathieu-Daudé
2020-01-15 15:06 ` [PATCH v2 34/86] arm:xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-15 22:59 ` Alistair Francis
2020-01-15 15:06 ` [PATCH v2 35/86] arm:xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-15 19:01 ` Philippe Mathieu-Daudé
2020-01-16 0:20 ` Alistair Francis
2020-01-15 15:06 ` [PATCH v2 37/86] arm:xlnx-zcu102: " Igor Mammedov
2020-01-15 19:21 ` Philippe Mathieu-Daudé
2020-01-16 0:19 ` Alistair Francis
2020-01-15 15:07 ` [PATCH v2 82/86] numa: forbid '-numa node, mem' for 5.0 and newer machine types Igor Mammedov
2020-01-15 15:34 ` [libvirt] " Peter Krempa
2020-01-15 16:52 ` Igor Mammedov
2020-01-16 10:42 ` Michal Privoznik
2020-01-16 12:37 ` Igor Mammedov
2020-01-16 13:03 ` Michal Privoznik
2020-01-16 13:49 ` Igor Mammedov
2020-01-16 13:06 ` Daniel P. Berrangé
2020-01-16 13:58 ` Igor Mammedov
2020-01-16 4:36 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200117105033.6801593a@redhat.com \
--to=imammedo@redhat.com \
--cc=Peter.Chubb@data61.csiro.au \
--cc=peter.chubb@nicta.com.au \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox