spapr: split the IRQ allocation sequence
commit4fe75a8ccd8005f8d0322c5b85ebee6243b2e753
authorCédric Le Goater <clg@kaod.org>
Mon, 18 Jun 2018 17:34:00 +0000 (18 19:34 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Jun 2018 11:22:53 +0000 (21 21:22 +1000)
tree0c92f857ae9de3c5d01b04c15d227875bbeb46ed
parent24c6863c7b61efcfe4a0f0916ed4e8b797c8d281
spapr: split the IRQ allocation sequence

Today, when a device requests for IRQ number in a sPAPR machine, the
spapr_irq_alloc() routine first scans the ICSState status array to
find an empty slot and then performs the assignement of the selected
numbers. Split this sequence in two distinct routines : spapr_irq_find()
for lookups and spapr_irq_claim() for claiming the IRQ numbers.

This will ease the introduction of a static layout of IRQ numbers.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_events.c
hw/ppc/spapr_pci.c
hw/ppc/spapr_vio.c
include/hw/ppc/spapr.h