pseries: Bugfixes for interrupt numbering in XICS code
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 3 Aug 2011 21:02:14 +0000 (21:02 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:48:02 +0000 (09:48 +0200)
commitdc21fbdca0658ae8899ce86449db5ad616c39935
tree8792f6773db5dc0f02481800b796b098ec940614
parent1e7c22470037f2769a921043848d69b35ef70632
pseries: Bugfixes for interrupt numbering in XICS code

The implementation of the XICS interrupt controller contains several
(difficult to trigger) bugs due to the fact that we were not 100%
consistent with which irq numbering we used.  In most places, global
numbers were used as handled by the presentation layer, however a few
functions took "local" numberings, that is the source number within
the interrupt source controller which is offset from the global
number.  In most cases the function and its caller agreed on this, but
in a few cases it didn't.

This patch cleans this up by always using global numbering.
Translation to the local number is now always and only done when we
look up the individual interrupt source state structure.  This should
remove the existing bugs and with luck reduce the chances of
re-introducing such bugs.

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