• Matthew Garrett's avatar
    [CPUFREQ] Fix PCC driver error path · 6ebdf777
    Matthew Garrett authored
    The PCC cpufreq driver unmaps the mailbox address range if any CPUs fail to
    initialise, but doesn't do anything to remove the registered CPUs from the
    cpufreq core resulting in failures further down the line. We're better off
    simply returning a failure - the cpufreq core will unregister us cleanly if
    we end up with no successfully registered CPUs. Tidy up the failure path
    and also add a sanity check to ensure that the firmware gives us a realistic
    frequency - the core deals badly with that being set to 0.
    Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
    Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    6ebdf777
pcc-cpufreq.c 15.5 KB