[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 22/24] ppc/xics: remove the 'xics' backlinks
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v3 22/24] ppc/xics: remove the 'xics' backlinks |
Date: |
Fri, 24 Feb 2017 11:18:21 +0100 |
These are not used anymore. Do the cleanups
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/xics.c | 28 ----------------------------
hw/intc/xics_kvm.c | 10 ----------
hw/ppc/spapr.c | 3 ---
include/hw/ppc/xics.h | 3 ---
4 files changed, 44 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 571063a67125..565b5ec0686a 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -360,23 +360,6 @@ static void icp_reset(DeviceState *dev)
qemu_set_irq(icp->output, 0);
}
-static void icp_realize(DeviceState *dev, Error **errp)
-{
- ICPState *icp = ICP(dev);
- Object *obj;
- Error *err = NULL;
-
- obj = object_property_get_link(OBJECT(dev), "xics", &err);
- if (!obj) {
- error_setg(errp, "%s: required link 'xics' not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
-
- icp->xics = XICS_COMMON(obj);
-}
-
-
static void icp_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -384,7 +367,6 @@ static void icp_class_init(ObjectClass *klass, void *data)
dc->reset = icp_reset;
dc->vmsd = &vmstate_icp_server;
- dc->realize = icp_realize;
ic->print_info = icp_pic_print_info;
}
@@ -634,16 +616,6 @@ static void ics_simple_initfn(Object *obj)
static void ics_simple_realize(DeviceState *dev, Error **errp)
{
ICSState *ics = ICS_SIMPLE(dev);
- Object *obj;
- Error *err = NULL;
-
- obj = object_property_get_link(OBJECT(dev), "xics", &err);
- if (!obj) {
- error_setg(errp, "%s: required link 'xics' not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
- ics->xics = XICS_COMMON(obj);
if (!ics->nr_irqs) {
error_setg(errp, "Number of interrupts needs to be greater 0");
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 850777eab913..7c1809873c29 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -323,16 +323,6 @@ static void ics_kvm_reset(DeviceState *dev)
static void ics_kvm_realize(DeviceState *dev, Error **errp)
{
ICSState *ics = ICS_SIMPLE(dev);
- Object *obj;
- Error *err = NULL;
-
- obj = object_property_get_link(OBJECT(dev), "xics", &err);
- if (!obj) {
- error_setg(errp, "%s: required link 'xics' not found: %s",
- __func__, error_get_pretty(err));
- return;
- }
- ics->xics = XICS_COMMON(obj);
if (!ics->nr_irqs) {
error_setg(errp, "Number of interrupts needs to be greater 0");
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 032c8ab008d8..cfd0139dd418 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -115,8 +115,6 @@ static XICSState *try_create_xics(sPAPRMachineState *spapr,
qdev_set_parent_bus(DEVICE(spapr->ics), sysbus_get_default());
object_property_add_child(OBJECT(spapr), "ics", OBJECT(spapr->ics), NULL);
object_property_set_int(OBJECT(spapr->ics), nr_irqs, "nr-irqs", &err);
- object_property_add_const_link(OBJECT(spapr->ics), "xics", OBJECT(xics),
- NULL);
object_property_set_bool(OBJECT(spapr->ics), true, "realized", &local_err);
error_propagate(&err, local_err);
if (err) {
@@ -132,7 +130,6 @@ static XICSState *try_create_xics(sPAPRMachineState *spapr,
object_initialize(icp, sizeof(*icp), type_icp);
qdev_set_parent_bus(DEVICE(icp), sysbus_get_default());
object_property_add_child(OBJECT(spapr), "icp[*]", OBJECT(icp), NULL);
- object_property_add_const_link(OBJECT(icp), "xics", OBJECT(xics),
NULL);
object_property_set_bool(OBJECT(icp), true, "realized", &err);
if (err) {
goto error;
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 1ea8d8139678..d1d110051c72 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -110,8 +110,6 @@ struct ICPState {
uint8_t mfrr;
qemu_irq output;
bool cap_irq_xics_enabled;
-
- XICSState *xics;
};
#define TYPE_ICS_BASE "ics-base"
@@ -147,7 +145,6 @@ struct ICSState {
uint32_t offset;
qemu_irq *qirqs;
ICSIRQState *irqs;
- XICSState *xics;
};
static inline bool ics_valid_irq(ICSState *ics, uint32_t nr)
--
2.7.4
- [Qemu-ppc] [PATCH v3 12/24] ppc/xics: register the reset handler of ICS objects, (continued)
- [Qemu-ppc] [PATCH v3 12/24] ppc/xics: register the reset handler of ICS objects, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 13/24] ppc/xics: remove the XICS list of ICS, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 14/24] ppc/xics: extend the QOM interface to handle ICPs, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 15/24] ppc/xics: simplify the cpu_setup() handler, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 16/24] ppc/xics: use the QOM interface to grab an ICP, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 17/24] ppc/xics: simplify spapr_dt_xics() interface, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 18/24] ppc/xics: register the reset handler of ICP objects, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 19/24] ppc/xics: move the ICP array under the sPAPR machine, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 20/24] ppc/xics: move kernel_xics_fd out of KVMXICSState, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 21/24] ppc/xics: move the cpu_setup() handler under the ICPState class, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 22/24] ppc/xics: remove the 'xics' backlinks,
Cédric Le Goater <=
- [Qemu-ppc] [PATCH v3 23/24] ppc/xics: export the XICS init routines, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 24/24] ppc/xics: remove the XICSState classes, Cédric Le Goater, 2017/02/24
- Re: [Qemu-ppc] [PATCH v3 00/24] ppc/xics: simplify ICS and ICP creation, Cédric Le Goater, 2017/02/24