qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: peter.crosthwaite@xilinx.com
To: afaerber@suse.de
Cc: peter.maydell@linaro.org, hutao@cn.fujitsu.com,
	aliguori@us.ibm.com, qemu-devel@nongnu.org, mst@redhat.com
Subject: [Qemu-devel] [PATCH qom-next v3 0/4]  QOM Super class access
Date: Mon, 15 Jul 2013 14:09:41 +1000	[thread overview]
Message-ID: <cover.1373861126.git.peter.crosthwaite@xilinx.com> (raw)

From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

This series enables QOM super class access and demostrates some usages.
Replaces the save->override->call via FooClass technique, to reduce
some of the boiler plate in recently fully QOMified devices.

Applied the change to ARM CPU, MB CPU and some of Andreas's recently
QOMified i386 devices, all which have the save->override->call issue.
ARMCPU I've done a brief test on and seems to work.

ARM CPU was particularly difficult, as it has 3 layers of heirachy,
where a non-concrete class (TYPE_ARM_CPU) need to super class itself
(to TYPE_CPU). This sees the need for super-classers to specify their
expected base class level. See patches for illustration.

The main future work to the series is to apply the change pattern to
the reset of the tree

changed since V2:
Removed object_class_get_parent_by_name
introduce FOO_PARENT_CLASS macros
changed since V1:
Simplified to use object_class_get_parent_by_type (suggest by Hu Tao)


Peter Crosthwaite (4):
  target-arm/cpu.c: delete un-needed instance/class sizes
  target-arm: Use parent classes for reset + realize
  target-microblaze: Use parent class for reset + realize
  i8254: Use parent class for realize

 hw/i386/kvm/i8254.c         | 19 ++++---------------
 hw/timer/i8254.c            | 17 ++++-------------
 target-arm/cpu-qom.h        | 22 ++--------------------
 target-arm/cpu.c            | 16 +++++-----------
 target-microblaze/cpu-qom.h | 22 ++--------------------
 target-microblaze/cpu.c     | 14 ++++----------
 6 files changed, 21 insertions(+), 89 deletions(-)

-- 
1.8.3.rc1.44.gb387c77.dirty

             reply	other threads:[~2013-07-15  4:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15  4:09 peter.crosthwaite [this message]
2013-07-15  4:10 ` [Qemu-devel] [PATCH qom-next v3 1/4] target-arm/cpu.c: delete un-needed instance/class sizes peter.crosthwaite
2013-07-15  4:10 ` [Qemu-devel] [PATCH qom-next v3 2/4] target-arm: Use parent classes for reset + realize peter.crosthwaite
2013-07-15  4:11 ` [Qemu-devel] [PATCH qom-next v3 3/4] target-microblaze: Use parent class " peter.crosthwaite
2013-07-15  4:12 ` [Qemu-devel] [PATCH qom-next v3 4/4] i8254: Use parent class for realize peter.crosthwaite

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=cover.1373861126.git.peter.crosthwaite@xilinx.com \
    --to=peter.crosthwaite@xilinx.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.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).