qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 01/24] xics: XICS should not be a SysBusDevice
Date: Fri, 24 Feb 2017 11:18:00 +0100	[thread overview]
Message-ID: <1487931503-10607-2-git-send-email-clg@kaod.org> (raw)
In-Reply-To: <1487931503-10607-1-git-send-email-clg@kaod.org>

From: David Gibson <david@gibson.dropbear.id.au>

Currently xics - the component of the IBM POWER interrupt controller
representing the overall interrupt fabric / architecture is
represented as a descendent of SysBusDevice.  However, this is not
really correct - the xics presents nothing in MMIO space so it should
be an "unattached" device in the current QOM model.

Since this device will always be created by the machine type, not created
specifically from the command line, and because it has no migrated state
it should be safe to move it around the device composition tree.

Therefore this patch changes it to a descendent of TYPE_DEVICE, and makes
it an unattached device.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
---
 hw/intc/xics.c | 2 +-
 hw/ppc/spapr.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 095c16a30082..372b8311fb8b 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -260,7 +260,7 @@ static void xics_common_class_init(ObjectClass *oc, void *data)
 
 static const TypeInfo xics_common_info = {
     .name          = TYPE_XICS_COMMON,
-    .parent        = TYPE_SYS_BUS_DEVICE,
+    .parent        = TYPE_DEVICE,
     .instance_size = sizeof(XICSState),
     .class_size    = sizeof(XICSStateClass),
     .instance_init = xics_common_initfn,
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 5904e6498f49..8af54494f166 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -101,7 +101,7 @@ static XICSState *try_create_xics(const char *type, int nr_servers,
     Error *err = NULL;
     DeviceState *dev;
 
-    dev = qdev_create(NULL, type);
+    dev = DEVICE(object_new(type));
     qdev_prop_set_uint32(dev, "nr_servers", nr_servers);
     qdev_prop_set_uint32(dev, "nr_irqs", nr_irqs);
     object_property_set_bool(OBJECT(dev), true, "realized", &err);
-- 
2.7.4

  reply	other threads:[~2017-02-24 10:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 10:17 [Qemu-devel] [PATCH v3 00/24] ppc/xics: simplify ICS and ICP creation Cédric Le Goater
2017-02-24 10:18 ` Cédric Le Goater [this message]
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 02/24] ppc/xics: fix ICP and ICS reset Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 03/24] ppc/xics: remove set_nr_irqs() handler from XICSStateClass Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 04/24] ppc/xics: remove set_nr_servers() " Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 05/24] ppc/xics: store the ICS object under the sPAPR machine Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 06/24] ppc/xics: add an InterruptStatsProvider interface to ICS and ICP objects Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 07/24] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 08/24] ppc/xics: use the QOM interface under the sPAPR machine Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 09/24] ppc/xics: use the QOM interface to get irqs Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 10/24] ppc/xics: use the QOM interface to resend irqs Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 11/24] ppc/xics: remove xics_find_source() Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 12/24] ppc/xics: register the reset handler of ICS objects Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 13/24] ppc/xics: remove the XICS list of ICS Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 14/24] ppc/xics: extend the QOM interface to handle ICPs Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 15/24] ppc/xics: simplify the cpu_setup() handler Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 16/24] ppc/xics: use the QOM interface to grab an ICP Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 17/24] ppc/xics: simplify spapr_dt_xics() interface Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 18/24] ppc/xics: register the reset handler of ICP objects Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 19/24] ppc/xics: move the ICP array under the sPAPR machine Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 20/24] ppc/xics: move kernel_xics_fd out of KVMXICSState Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 21/24] ppc/xics: move the cpu_setup() handler under the ICPState class Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 22/24] ppc/xics: remove the 'xics' backlinks Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 23/24] ppc/xics: export the XICS init routines Cédric Le Goater
2017-02-24 10:18 ` [Qemu-devel] [PATCH v3 24/24] ppc/xics: remove the XICSState classes Cédric Le Goater
2017-02-24 10:41 ` [Qemu-devel] [PATCH v3 00/24] ppc/xics: simplify ICS and ICP creation Cédric Le Goater

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=1487931503-10607-2-git-send-email-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).