From: Aurelien Jarno <aurelien@aurel32.net>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Register only one qbus_reset_all_fn() for system bus
Date: Fri, 1 Apr 2011 21:57:46 +0200 [thread overview]
Message-ID: <20110401195746.GB24630@volta.aurel32.net> (raw)
In-Reply-To: <1298243333-23799-1-git-send-email-dbaryshkov@gmail.com>
On Mon, Feb 21, 2011 at 02:08:53AM +0300, Dmitry Eremin-Solenikov wrote:
> Currently reset handler is registered for System bus twice: once during
> bus creation and once in vl.c. Remove the second qemu_register_reset()
> invocation. Also while we are at it, remove incorrect check at
> qbus_create_inplace(): when system bus is created, main_system_bus is
> NULL (as it's not yet created, it cannot be set), so the check is just
> wrong.
>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> hw/qdev.c | 2 +-
> vl.c | 3 ---
> 2 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/hw/qdev.c b/hw/qdev.c
> index 1aa1ea0..0a3c8ce 100644
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
> @@ -762,7 +762,7 @@ void qbus_create_inplace(BusState *bus, BusInfo *info,
> if (parent) {
> QLIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
> parent->num_child_bus++;
> - } else if (bus != main_system_bus) {
> + } else {
> /* TODO: once all bus devices are qdevified,
> only reset handler for main_system_bus should be registered here. */
> qemu_register_reset(qbus_reset_all_fn, bus);
> diff --git a/vl.c b/vl.c
> index 91be92e..24923db 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3120,9 +3120,6 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
>
> - /* TODO: once all bus devices are qdevified, this should be done
> - * when bus is created by qdev.c */
> - qemu_register_reset(qbus_reset_all_fn, sysbus_get_default());
> qemu_run_machine_init_done_notifiers();
>
> qemu_system_reset();
Have you verified that all bus devices have been qdevified since this
code has been added? I wouldn't bet it is the case.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2011-04-01 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 23:08 [Qemu-devel] [PATCH] Register only one qbus_reset_all_fn() for system bus Dmitry Eremin-Solenikov
2011-04-01 19:57 ` Aurelien Jarno [this message]
2011-04-02 0:12 ` Isaku Yamahata
2011-04-02 14:47 ` Dmitry Eremin-Solenikov
2011-04-03 10:26 ` Isaku Yamahata
2011-04-04 11:58 ` Dmitry Eremin-Solenikov
2011-04-04 13:54 ` Isaku Yamahata
-- strict thread matches above, loose matches on Subject: below --
2011-03-10 8:53 Dmitry Eremin-Solenikov
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=20110401195746.GB24630@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=dbaryshkov@gmail.com \
--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).