Skip to content
  • Russell King's avatar
    ARM: GIC: fix GIC cpumask initialization · 2bb31351
    Russell King authored
    Punit Agrawal reports:
    > I was trying to boot 3.8-rc5 on Realview EB 11MPCore using
    > realview-smp_defconfig as a starting point but the kernel failed to
    > progress past the log below (config attached).
    >
    > Pawel suggested I try reverting 384a2902
    
     - "ARM: gic: use a private
    > mapping for CPU target interfaces" that you've authored. With this
    > commit reverted the kernel boots.
    >
    > I am not quite sure why the commit breaks 11MPCore but Pawel (cc'd)
    > might be able to shed light on that.
    
    Some early GIC implementations return zero for the first distributor
    CPU routing register.  This means we can't rely on that telling us
    which CPU interface we're connected to.  We know that these platforms
    implement PPIs for IRQs 29-31 - but we shouldn't assume that these
    will always be populated.
    
    So, instead, scan for a non-zero CPU routing register in the first
    32 IRQs and use that as our CPU mask.
    
    Reported-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
    Reviewed-by: default avatarNicolas Pitre <nico@linaro.org>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    2bb31351