]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: powernv: Fix init_chip_info initialization in numa=off
authorPratik R. Sampat <psampat@linux.ibm.com>
Wed, 28 Jul 2021 12:05:00 +0000 (17:35 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 13 Aug 2021 12:04:25 +0000 (22:04 +1000)
commitd318838812b760146298535e0baeb9eda18c4597
treedf9d51e5e5bc636726ef54b93228b0e0ac95508a
parent089c343bcde551b25a853b1ce0d721af44cc6b55
cpufreq: powernv: Fix init_chip_info initialization in numa=off

In the numa=off kernel command-line configuration init_chip_info() loops
around the number of chips and attempts to copy the cpumask of that node
which is NULL for all iterations after the first chip.

Hence, store the cpu mask for each chip instead of derving cpumask from
node while populating the "chips" struct array and copy that to the
chips[i].mask

Fixes: 92a1fc1dae4d ("cpufreq: powernv: Handle throttling due to Pmax capping at chip level")
Cc: stable@vger.kernel.org # v4.3+
Reported-by: Shirisha Ganta <shirisha.ganta1@ibm.com>
Signed-off-by: Pratik R. Sampat <psampat@linux.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
[mpe: Rename goto label to out_free_chip_cpu_mask]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210728120500.87549-2-psampat@linux.ibm.com
drivers/cpufreq/powernv-cpufreq.c