• Gautham R. Shenoy's avatar
    powerpc/powernv/idle: Don't override default/deepest directly in kernel · f3b3f284
    Gautham R. Shenoy authored
    Currently during idle-init on power9, if we don't find suitable stop
    states in the device tree that can be used as the
    default_stop/deepest_stop, we set stop0 (ESL=1,EC=1) as the default
    stop state psscr to be used by power9_idle and deepest stop state
    which is used by CPU-Hotplug.
    
    However, if the platform firmware has not configured or enabled a stop
    state, the kernel should not make any assumptions and fallback to a
    default choice.
    
    If the kernel uses a stop state that is not configured by the platform
    firmware, it may lead to further failures which should be avoided.
    
    In this patch, we modify the init code to ensure that the kernel uses
    only the stop states exposed by the firmware through the device
    tree. When a suitable default stop state isn't found, we disable
    ppc_md.power_save for power9. Similarly, when a suitable
    deepest_stop_state is not found in the device tree exported by the
    firmware, fall back to the default busy-wait loop in the CPU-Hotplug
    code.
    
    [Changelog written with inputs from svaidy@linux.vnet.ibm.com]
    Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    f3b3f284
idle.c 15.3 KB