Commit ac9816dc authored by Akshay Adiga's avatar Akshay Adiga Committed by Michael Ellerman

powerpc/powernv/cpuidle: Init all present cpus for deep states

Init all present cpus for deep states instead of "all possible" cpus.
Init fails if a possible cpu is guarded. Resulting in making only
non-deep states available for cpuidle/hotplug.

Stewart says, this means that for single threaded workloads, if you
guard out a CPU core you'll not get WoF (Workload Optimised
Frequency), which means that performance goes down when you wouldn't
expect it to.

Fixes: 77b54e9f ("powernv/powerpc: Add winkle support for offline cpus")
Cc: stable@vger.kernel.org # v3.19+
Signed-off-by: default avatarAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 458c7017
...@@ -79,7 +79,7 @@ static int pnv_save_sprs_for_deep_states(void) ...@@ -79,7 +79,7 @@ static int pnv_save_sprs_for_deep_states(void)
uint64_t msr_val = MSR_IDLE; uint64_t msr_val = MSR_IDLE;
uint64_t psscr_val = pnv_deepest_stop_psscr_val; uint64_t psscr_val = pnv_deepest_stop_psscr_val;
for_each_possible_cpu(cpu) { for_each_present_cpu(cpu) {
uint64_t pir = get_hard_smp_processor_id(cpu); uint64_t pir = get_hard_smp_processor_id(cpu);
uint64_t hsprg0_val = (uint64_t)paca_ptrs[cpu]; uint64_t hsprg0_val = (uint64_t)paca_ptrs[cpu];
...@@ -814,7 +814,7 @@ static int __init pnv_init_idle_states(void) ...@@ -814,7 +814,7 @@ static int __init pnv_init_idle_states(void)
int cpu; int cpu;
pr_info("powernv: idle: Saving PACA pointers of all CPUs in their thread sibling PACA\n"); pr_info("powernv: idle: Saving PACA pointers of all CPUs in their thread sibling PACA\n");
for_each_possible_cpu(cpu) { for_each_present_cpu(cpu) {
int base_cpu = cpu_first_thread_sibling(cpu); int base_cpu = cpu_first_thread_sibling(cpu);
int idx = cpu_thread_in_core(cpu); int idx = cpu_thread_in_core(cpu);
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment