• C
    ppc/xics: remove set_nr_irqs() handler from XICSStateClass · 4e4169f7
    Cédric Le Goater 提交于
    Today, the ICS (Interrupt Controller Source) object is created and
    realized by the init and realize routines of the XICS object, but some
    of the parameters are only known at the machine level.
    
    These parameters are passed from the sPAPR machine to the ICS object
    in a rather convoluted way using property handlers and a class handler
    of the XICS object. The number of irqs required to allocate the IRQ
    state objects in the ICS realize routine is one of them.
    
    Let's simplify the process by creating the ICS object along with the
    XICS object at the machine level and link the ICS into the XICS list
    of ICSs at this level also. In the sPAPR machine, there is only a
    single ICS but that will change with the PowerNV machine.
    
    Also, QOMify the creation of the objects and get rid of the
    superfluous code.
    Signed-off-by: NCédric Le Goater <clg@kaod.org>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    4e4169f7
spapr.c 105.6 KB