From: Peter Maydell <peter.maydell@linaro.org>
To: Andrew Jones <drjones@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Eric Auger <eric.auger@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.13 v2 5/5] arm/boot: split load_dtb() from arm_load_kernel()
Date: Fri, 27 Apr 2018 18:51:02 +0100 [thread overview]
Message-ID: <CAFEAcA_NMWuA8WSs3cNeY6xX1kerO_uAcN_3=fK02BEhHJW86g@mail.gmail.com> (raw)
In-Reply-To: <20180427134728.2w5f3tx2hjcdgucd@kamzik.brq.redhat.com>
On 27 April 2018 at 14:47, Andrew Jones <drjones@redhat.com> wrote:
> On Wed, Apr 18, 2018 at 04:28:05PM +0200, Igor Mammedov wrote:
>> @@ -1173,15 +1141,6 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
>> for (cs = CPU(cpu); cs; cs = CPU_NEXT(cs)) {
>> ARM_CPU(cs)->env.boot_info = info;
>> }
>
> I wonder why we need to start at cpu here, but first_cpu below. If
> they could both be first_cpu, then we could merge the loop statements
> into one loop. Reading enough code to build confidence that it could
> be first_cpu is too much to ask for a Friday afternoon though...
It should be starting at first_cpu -- starting with 'cpu' is
a bug. However as with the bug fixed in 75ed2c02484101d5, it
isn't currently causing any incorrect behaviour, because every
board we have is passing first_cpu as the boot cpu, either directly
or indirectly.
There is a theoretical use case for only feeding the boot_info
to a subset of CPUs, which is where you have a setup like
the xilinx zynqmp which has 4x A-class cores which run Linux
and 4x R-class cores which run something else; in that setup
you might want to say "the boot_info stuff we have here is
just for the A-class cluster, and the R-class cores should
look after themselves". However, (a) we don't really properly
support heterogenous setups like that -- zynqmp works by
accident rather than design -- and (b) if we do want to
support them we need a sensible API for indicating which
CPUs should or should not be involved in -kernel boot as
primary or secondaries.
So we should fix this loop to start at first_cpu, and worry
about the heterogenous setup usecase if and when it becomes
reality rather than theory.
thanks
-- PMM
next prev parent reply other threads:[~2018-04-27 17:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 14:28 [Qemu-devel] [PATCH for-2.13 v2 0/5] arm: isolate and clean up dtb generation Igor Mammedov
2018-04-18 14:28 ` [Qemu-devel] [PATCH for-2.13 v2 1/5] arm: always start from first_cpu when registering loader cpu reset callback Igor Mammedov
2018-04-18 16:20 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-04-18 14:28 ` [Qemu-devel] [PATCH for-2.13 v2 2/5] ppc: e500: switch E500 based machines to full machine definition Igor Mammedov
2018-04-19 4:15 ` David Gibson
2018-04-19 8:30 ` Igor Mammedov
2018-04-19 9:47 ` David Gibson
2018-04-18 14:28 ` [Qemu-devel] [PATCH for-2.13 v2 3/5] pc: simplify MachineClass::get_hotplug_handler handling Igor Mammedov
2018-04-18 14:56 ` Eduardo Habkost
2018-04-18 16:19 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-04-19 8:02 ` [Qemu-devel] " Igor Mammedov
2018-04-18 14:28 ` [Qemu-devel] [PATCH for-2.13 v2 4/5] platform-bus-device: use device plug callback instead of machine_done notifier Igor Mammedov
2018-04-18 16:29 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-04-19 8:18 ` [Qemu-devel] [PATCH for-2.13 v3 " Igor Mammedov
2018-04-18 14:28 ` [Qemu-devel] [PATCH for-2.13 v2 5/5] arm/boot: split load_dtb() from arm_load_kernel() Igor Mammedov
2018-04-27 13:47 ` Andrew Jones
2018-04-27 17:51 ` Peter Maydell [this message]
2018-05-01 9:43 ` Igor Mammedov
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='CAFEAcA_NMWuA8WSs3cNeY6xX1kerO_uAcN_3=fK02BEhHJW86g@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=drjones@redhat.com \
--cc=eric.auger@redhat.com \
--cc=imammedo@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;
as well as URLs for NNTP newsgroup(s).