OSDN Git Service

pseries: Refactor spapr irq allocation
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 15 Sep 2011 20:49:49 +0000 (20:49 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:48:09 +0000 (09:48 +0200)
commite6c866d417d1a09536f489e66c21cf49b7ec60b6
tree70fc7c03c5616c7446f6a866ce31e87a7520fb34
parent44427c401f7c0053db31f40a58a427e1ae3cd8c3
pseries: Refactor spapr irq allocation

Paulo Bonzini changed the original spapr code, which manually assigned irq
numbers for each virtual device, to allocate them automatically from the
device initialization. That allowed spapr virtual devices to be constructed
with -device, which is a good start.  However, the way that patch worked
doesn't extend nicely for the future when we want to support devices other
than sPAPR VIO devices (e.g. virtio and PCI).

This patch rearranges the irq allocation to be global across the sPAPR
environment, so it can be used by other bus types as well.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr.c
hw/spapr.h
hw/spapr_vio.c
hw/spapr_vio.h