qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Rob Herring <robherring2@gmail.com>
Cc: "Rob Herring" <rob.herring@linaro.org>,
	"Linaro Patches" <patches@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] hw/arm/vexpress: Set reset-cbar property for CPUs
Date: Thu, 13 Feb 2014 21:45:23 +0000	[thread overview]
Message-ID: <CAFEAcA8MQ+c1ZRJ9sDT-r7rhWDuXXf4waTEaJPP17AuBozzbqw@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqKe_5hFrg=qh4=_hkrzf4TY95nQnj=EhGypTUwCQ0pfuw@mail.gmail.com>

On 13 February 2014 21:31, Rob Herring <robherring2@gmail.com> wrote:
> On Thu, Feb 13, 2014 at 8:26 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Newer versions of the Linux kernel (as of commit bc41b8724 in 3.12)
>> now assume that if the CPU is a Cortex-A9 and the reset value of the
>> PERIPHBASE/CBAR register is zero then the CPU is a specific buggy
>> single core A9 SoC, and will not try to start other cores. Since we
>> now have a CPU property for the reset value of the CBAR, we can
>> just fix the vexpress board model to correctly set CBAR so SMP
>> works again. To avoid duplicate boilerplate code in both the A9
>> and A15 daughterboard init functions, we split out the CPU and
>> private memory region init to its own function.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> Reported-by: Rob Herring <rob.herring@linaro.org>
>> ---
>> Thanks to Rob for tracking down this SMP boot issue and identifying
>> the offending kernel change (which personally I think is a terrible
>> hack, but it's in shipping kernels and our  models ought to be
>> accurate for CBAR anyway).
>
> And i was working on the fix as well...

Ah, sorry. I checked your git repo to see if there was a patch
in it, but didn't find anything so I guessed you'd just done a
quick "get it working" patch.

>> +static void init_cpus(const char *cpu_model, const char *privdev,
>> +                      hwaddr periphbase, qemu_irq *pic)
>
> There is nothing really vexpress specific about this function other
> than number of irqs. This is really just expanding cpu_arm_init which
> is the route I was going down.

However cpu_arm_init() is in target-arm and has no
business instantiating devices. I think the correct long
term approach is going to involve the A9 and A15
private peripheral devices instantiating the CPUs themselves.
But I figured that two weeks before soft freeze was perhaps
not the best time to open that can of worms, hence this patch
which is localised to just the machine model code.

thanks
-- PMM

  reply	other threads:[~2014-02-13 21:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 14:26 [Qemu-devel] [PATCH] hw/arm/vexpress: Set reset-cbar property for CPUs Peter Maydell
2014-02-13 21:31 ` Rob Herring
2014-02-13 21:45   ` Peter Maydell [this message]
2014-02-13 23:39     ` Peter Crosthwaite
2014-02-13 23:51       ` Peter Maydell
2014-02-18 16:39 ` Peter Maydell

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=CAFEAcA8MQ+c1ZRJ9sDT-r7rhWDuXXf4waTEaJPP17AuBozzbqw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob.herring@linaro.org \
    --cc=robherring2@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).