qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Juan Quintela <quintela@redhat.com>, Jia Liu <proljc@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v8 01/16] target-or32: Add target stubs and QOM cpu
Date: Thu, 05 Jul 2012 15:31:03 +0200	[thread overview]
Message-ID: <4FF59717.2030901@redhat.com> (raw)
In-Reply-To: <4FF5951F.9060502@suse.de>

Il 05/07/2012 15:22, Andreas Färber ha scritto:
>> > +static void openrisc_any_initfn(Object *obj)
>> > +{
>> > +    OpenRISCCPU *cpu = OPENRISC_CPU(obj);
>> > +
>> > +    set_feature(cpu, OPENRISC_FEATURE_OB32S);
>> > +    set_feature(cpu, OPENRISC_FEATURE_OF32S);
>> > +
>> > +    cpu_reset(CPU(cpu));
>> > +}
> Paolo, could class_base_init or something help with this pattern of
> needing to do something in every derived initfn?

I guess what you're looking for is some instance_post_init that is
called at init time after instance_init?

> On the other hand I think we should move cpu_reset() into the realizefn
> instead, that would avoid this issue here.

Yep.

Paolo

  reply	other threads:[~2012-07-05 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1341110730-444-1-git-send-email-proljc@gmail.com>
     [not found] ` <1341110730-444-9-git-send-email-proljc@gmail.com>
2012-07-03 18:48   ` [Qemu-devel] [PATCH v8 08/16] target-or32: Add instruction translation Blue Swirl
2012-07-04  2:23     ` Jia Liu
2012-07-04 23:59       ` Jia Liu
2012-07-05 18:45         ` Blue Swirl
2012-07-06  0:23           ` Jia Liu
     [not found] ` <1341110730-444-2-git-send-email-proljc@gmail.com>
2012-07-05 13:22   ` [Qemu-devel] [PATCH v8 01/16] target-or32: Add target stubs and QOM cpu Andreas Färber
2012-07-05 13:31     ` Paolo Bonzini [this message]
2012-07-05 15:31       ` Andreas Färber
2012-07-09  7:08     ` Jia Liu

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=4FF59717.2030901@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=proljc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).