From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Auger <eric.auger@linaro.org>
Cc: "Joel Schopp" <joel.schopp@amd.com>,
"Kim Phillips" <kim.phillips@freescale.com>,
eric.auger@st.com, "Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
"Patch Tracking" <patches@linaro.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Alexander Graf" <agraf@suse.de>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"Shannon Zhao" <zhaoshenglong@huawei.com>,
b.reynal@virtualopensystems.com,
"Andreas Färber" <afaerber@suse.de>,
"Christoffer Dall" <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v8 2/3] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier
Date: Tue, 6 Jan 2015 17:55:26 +0000 [thread overview]
Message-ID: <CAFEAcA8TR8QHfHvWtdP=hrZzhLOGO9ZyTPBN_MpCRLvo4rkPqw@mail.gmail.com> (raw)
In-Reply-To: <1420474453-10058-3-git-send-email-eric.auger@linaro.org>
On 5 January 2015 at 16:14, Eric Auger <eric.auger@linaro.org> wrote:
> Device tree nodes for the platform bus and its children dynamic sysbus
> devices are added in a machine init done notifier. To load the dtb once,
> after those latter nodes are built and before ROM freeze, the actual
> arm_load_kernel existing code is moved into a notifier notify function,
> arm_load_kernel_notify. arm_load_kernel now only registers the
> corresponding notifier.
>
> Machine files that do not support platform bus stay unchanged. Machine
> files willing to support dynamic sysbus devices must call arm_load_kernel
> before sysbus-fdt arm_register_platform_bus_fdt_creator to make sure
> dynamic sysbus device nodes are integrated in the dtb.
> --- a/include/hw/arm/arm.h
> +++ b/include/hw/arm/arm.h
> @@ -19,6 +19,16 @@ qemu_irq *armv7m_init(MemoryRegion *system_memory,
> int flash_size, int sram_size,
> const char *kernel_filename, const char *cpu_model);
>
> +/*
> + * struct used as a parameter of the arm_load_kernel machine init
> + * done notifier
> + */
> +typedef struct {
> + ARMCPU *cpu; /* handle to the first cpu object */
> + Notifier notifier; /* actual notifier */
This is an odd order -- why not put 'notifier' first?
> +} ArmLoadKernelNotifier;
> +
> +
This breaks building of the linux-user targets:
In file included from
/home/petmay01/linaro/qemu-from-laptop/qemu/target-arm/cpu.c:29:0:
/home/petmay01/linaro/qemu-from-laptop/qemu/include/hw/arm/arm.h:28:5:
error: unknown type name ‘Notifier’
Notifier notifier; /* actual notifier */
^
make[1]: *** [target-arm/cpu.o] Error 1
Including "qemu/notify.h" in this file fixes it.
Also, stray blank line.
Otherwise looks OK. (It seems a slight shame to have to drag
notify.h into everything that includes arm.h when really the
notifier is just a detail of the implementation of boot.c,
but I can't see a nice way round that, so never mind.)
-- PMM
next prev parent reply other threads:[~2015-01-06 17:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 16:14 [Qemu-devel] [PATCH v8 0/3] machvirt dynamic sysbus device instantiation Eric Auger
2015-01-05 16:14 ` [Qemu-devel] [PATCH v8 1/3] hw/arm/sysbus-fdt: helpers for platform bus nodes addition Eric Auger
2015-01-06 18:40 ` Peter Maydell
2015-01-07 10:28 ` Eric Auger
2015-01-05 16:14 ` [Qemu-devel] [PATCH v8 2/3] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier Eric Auger
2015-01-06 17:55 ` Peter Maydell [this message]
2015-01-05 16:14 ` [Qemu-devel] [PATCH v8 3/3] hw/arm/virt: add dynamic sysbus device support Eric Auger
2015-01-06 18:57 ` Peter Maydell
2015-01-07 17:08 ` Eric Auger
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='CAFEAcA8TR8QHfHvWtdP=hrZzhLOGO9ZyTPBN_MpCRLvo4rkPqw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=ard.biesheuvel@linaro.org \
--cc=b.reynal@virtualopensystems.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@linaro.org \
--cc=eric.auger@st.com \
--cc=joel.schopp@amd.com \
--cc=kim.phillips@freescale.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhaoshenglong@huawei.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).