Commit 72c1e5a6 authored by Cédric Le Goater's avatar Cédric Le Goater Committed by David Gibson
Browse files

ppc/xics: allow ICSState to have an offset 0



commit 15ed653f ("ppc/xics: An ICS with offset 0 is assumed to be
uninitialized") introduced an extra check on the ICS offset which is
not strictly necessary.

Revert the change to be able to map the XICS IRQ number space on the
XIVE IRQ number space.

Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 872ff3de
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -139,8 +139,7 @@ struct ICSState {

static inline bool ics_valid_irq(ICSState *ics, uint32_t nr)
{
    return (ics->offset != 0) && (nr >= ics->offset)
        && (nr < (ics->offset + ics->nr_irqs));
    return (nr >= ics->offset) && (nr < (ics->offset + ics->nr_irqs));
}

struct ICSIRQState {