All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@iki.fi>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>, qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v1 1/3] bcm2836: Make CPU type configurable
Date: Fri, 16 Feb 2018 09:04:21 +0200	[thread overview]
Message-ID: <d7b4ff0d-d05f-0128-f403-d525a6e4176d@iki.fi> (raw)
In-Reply-To: <CAFEAcA8EWmaf5JWEmgBsNknTHuKDaHCnEAQgatn7Ppq-Gy8Fzg@mail.gmail.com>



On 02/15/2018 01:48 PM, Peter Maydell wrote:
> On 8 February 2018 at 05:50, Pekka Enberg <penberg@iki.fi> wrote:
>> This patch adds a "cpu-type" property to BCM2836 SoC in preparation for
>> reusing the code for the Raspberry Pi 3, which has a different processor
>> model.
>>
>> Signed-off-by: Pekka Enberg <penberg@iki.fi>
> 
>> --- a/hw/arm/raspi.c
>> +++ b/hw/arm/raspi.c
>> @@ -135,6 +135,8 @@ static void raspi2_init(MachineState *machine)
>>       /* Setup the SOC */
>>       object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram),
>>                                      &error_abort);
>> +    object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type",
>> +                            &error_abort);
>>       object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus",
>>                               &error_abort);
>>       object_property_set_int(OBJECT(&s->soc), 0xa21041, "board-rev",
>> @@ -166,6 +168,7 @@ static void raspi2_machine_init(MachineClass *mc)
>>       mc->no_parallel = 1;
>>       mc->no_floppy = 1;
>>       mc->no_cdrom = 1;
>> +    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
>>       mc->max_cpus = BCM2836_NCPUS;
>>       mc->min_cpus = BCM2836_NCPUS;
>>       mc->default_cpus = BCM2836_NCPUS;
> 
> This change means that instead of ignoring the user's -cpu argument
> we'll now unconditionally accept it even if it's nonsense for this
> board. Neither behaviour is great. However, the patchset to allow
> boards to easily specify the valid set of CPU types is still in
> code review:
> https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg00308.html
> 
> so I'm happy to take this as-is, and we'll add the validity check
> when that patchset goes in.

I wondered about that too, but I applied the "monkey see, monkey do" 
approach to your review comments of the previous attempt. :-) But 
indeed, I also think we can fix this later in the tree.

- Pekka

      reply	other threads:[~2018-02-16  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  5:50 [Qemu-devel] [PATCH v1 0/3] Raspberry Pi 3 support Pekka Enberg
2018-02-08  5:50 ` [Qemu-devel] [PATCH v1 2/3] raspi: " Pekka Enberg
2018-02-08  5:50 ` [Qemu-devel] [PATCH v1 3/3] raspi: Add "raspi3" machine type Pekka Enberg
2018-02-15 12:39   ` Peter Maydell
2018-02-15 12:49     ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-15 13:14       ` Philippe Mathieu-Daudé
2018-02-15 13:18         ` Peter Maydell
2018-02-15 13:28           ` Philippe Mathieu-Daudé
2018-02-16  7:08     ` [Qemu-devel] " Pekka Enberg
     [not found] ` <20180208055039.24666-2-penberg@iki.fi>
2018-02-15 11:48   ` [Qemu-devel] [PATCH v1 1/3] bcm2836: Make CPU type configurable Peter Maydell
2018-02-16  7:04     ` Pekka Enberg [this message]

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=d7b4ff0d-d05f-0128-f403-d525a6e4176d@iki.fi \
    --to=penberg@iki.fi \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.