• Gavin Shan's avatar
    powerpc/eeh: Fix PE#0 check in eeh_add_to_parent_pe() · 433185d2
    Gavin Shan authored
    The function eeh_add_parent_pe() is used to create a PE or add one
    edev to its parent PE. Current code checks if PE#0 is valid for the
    later case. Actually, we should validate PE#0 for both cases when
    EEH core regards PE#0 as invalid one (without flag EEH_VALID_PE_ZERO).
    Otherwise, not all EEH devices can be added to its parent PE#0 for
    EEH on P7IOC.
    
    The patch fixes the issue by validating PE#0 for the two cases. So far,
    we don't have PE#0 for EEH on P7IOC, but it will show up when we enable
    M64 for P7IOC. The patch also makes the error message more meaningful.
    Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    433185d2
eeh_pe.c 22.9 KB