• Mohan Kumar M's avatar
    [POWERPC] pSeries/kexec: Fix for interrupt distribution · a5715d6d
    Mohan Kumar M authored
    This allows any secondary CPU thread also to become boot cpu for
    POWER5.  The patch is required to solve kdump boot issue when the
    kdump kernel is booted with parameter "maxcpus=1".  XICS init code
    tries to match the current boot cpu id with "reg" property in each CPU
    node in the device tree.  But CPU node is created only for primary
    thread CPU ids and "reg" property only reflects primary CPU ids.  So
    when a kernel is booted on a secondary cpu thread above condition will
    never meet and the default distribution server is left as zero.  This
    leads to route the interrupts to CPU 0, but which is not online at
    this time.
    
    We use ibm,ppc-interrupt-server#s to check for both primary and
    secondary CPU ids.  Accordingly default distribution server value is
    initialized from "ibm,ppc-interrupt-gserver#s" property.  We loop
    through ibm,ppc-interrupt-gserver#s property to find the global
    distribution server from the last entry that matches with boot cpuid.
    Signed-off-by: default avatarMohan Kumar M <mohan@in.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    a5715d6d
xics.c 20.2 KB