• Jacob Shin's avatar
    [CPUFREQ] CPU hotplug, re-create sysfs directory and symlinks · 27ecddc2
    Jacob Shin authored
    When we discover CPUs that are affected by each other's
    frequency/voltage transitions, the first CPU gets a sysfs directory
    created, and rest of the siblings get symlinks. Currently, when we
    hotplug off only the first CPU, all of the symlinks and the sysfs
    directory gets removed. Even though rest of the siblings are still
    online and functional, they are orphaned, and no longer governed by
    cpufreq.
    
    This patch, given the above scenario, creates a sysfs directory for
    the first sibling and symlinks for the rest of the siblings.
    
    Please note the recursive call, it was rather too ugly to roll it
    out. And the removal of redundant NULL setting (it is already taken
    care of near the top of the function).
    Signed-off-by: default avatarJacob Shin <jacob.shin@amd.com>
    Acked-by: default avatarMark Langsdorf <mark.langsdorf@amd.com>
    Reviewed-by: default avatarThomas Renninger <trenn@suse.de>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    Cc: stable@kernel.org
    27ecddc2
cpufreq.c 50.8 KB