From: Benjamin Herrenschmidt <b...@kernel.crashing.org> This will make life easier for dealing with dynamically configured ICSes such as PHB3
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com> --- include/hw/ppc/xics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index be96fd8..3c63c36 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -149,7 +149,7 @@ struct ICSState { static inline bool ics_valid_irq(ICSState *ics, uint32_t nr) { - return (nr >= ics->offset) + return (ics->offset != 0) && (nr >= ics->offset) && (nr < (ics->offset + ics->nr_irqs)); } -- 2.7.4