From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>,
rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH 2/7] target-alpha: Turn CPU definitions into subclasses
Date: Thu, 06 Dec 2012 16:51:31 +0100 [thread overview]
Message-ID: <50C0BF03.90206@suse.de> (raw)
In-Reply-To: <20121206152933.GG4986@otherpad.lan.raisama.net>
Am 06.12.2012 16:29, schrieb Eduardo Habkost:
> On Wed, Oct 31, 2012 at 04:03:59AM +0100, Andreas Färber wrote:
> [...]
>> +static void alpha_cpu_register(const AlphaCPUInfo *info)
>> +{
>> + TypeInfo type_info = {
>> + .name = info->name,
>> + .parent = TYPE_ALPHA_CPU,
>> + .instance_init = info->initfn,
>> + };
>> +
>> + type_register_static(&type_info);
>
> You should use type_register() instead of type_register_static(), here.
I still don't understand why. (CC'ing Anthony, Paolo, Peter)
The TypeInfo argument is in no way retained inside
qom/object.c:type_register_internal().
Therefore the lifetime of TypeInfo should be completely irrelevant for
the static/non-static decision and the documentation should be fixed IMO.
Is there a reason to do it differently? What would we want to do with
TypeInfo after transfer of its field values to TypeImpl?
FWIW if, as suggested earlier, we don't loop over Alpha CPU models in
favor of a handful of trivial static TypeInfos, it becomes irrelevant
for this patch but I'd still like to understand for the remaining
architectures.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-12-06 15:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 3:03 [Qemu-devel] [PATCH 0/7] target-alpha: More CPU QOM'ifications Andreas Färber
2012-10-31 3:03 ` [Qemu-devel] [FYI 1/7] target-alpha: Use consistent include paths Andreas Färber
2012-10-31 3:03 ` [Qemu-devel] [PATCH 2/7] target-alpha: Turn CPU definitions into subclasses Andreas Färber
2012-10-31 4:57 ` Richard Henderson
2012-12-06 10:11 ` Andreas Färber
2012-12-07 13:58 ` Richard Henderson
2012-12-06 15:29 ` Eduardo Habkost
2012-12-06 15:51 ` Andreas Färber [this message]
2012-12-06 16:09 ` Eduardo Habkost
2012-12-06 16:21 ` Andreas Färber
2012-10-31 3:04 ` [Qemu-devel] [PATCH 3/7] target-alpha: Add support for -cpu ? Andreas Färber
2012-10-31 5:01 ` Richard Henderson
2012-12-06 15:37 ` Eduardo Habkost
2012-12-06 15:42 ` Andreas Färber
2012-12-06 16:02 ` Andreas Färber
2012-12-06 17:45 ` Eduardo Habkost
2012-12-06 15:59 ` Peter Maydell
2012-12-06 16:10 ` Eduardo Habkost
2012-10-31 3:04 ` [Qemu-devel] [PATCH 4/7] target-alpha: Let cpu_alpha_init() return AlphaCPU Andreas Färber
2012-10-31 5:02 ` Richard Henderson
2012-10-31 3:04 ` [Qemu-devel] [PATCH 5/7] alpha: Pass AlphaCPU array to Typhoon Andreas Färber
2012-10-31 5:04 ` Richard Henderson
2012-10-31 3:04 ` [Qemu-devel] [PATCH 6/7] target-alpha: Avoid leaking the alarm timer over reset Andreas Färber
2012-10-31 5:08 ` Richard Henderson
2012-10-31 3:04 ` [Qemu-devel] [RFC 7/7] target-alpha: Implement CPU reset Andreas Färber
2012-10-31 5:10 ` Richard Henderson
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=50C0BF03.90206@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).