]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Fix IMC_MAX_PMU macro
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Wed, 22 Nov 2017 05:15:39 +0000 (10:45 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 22 Nov 2017 12:04:23 +0000 (23:04 +1100)
commit6ec09243ac2c774b8b367974d4c490e90c758caf
tree5542875410b1fb049b34625245de3bfa10f708c6
parent7a4085717721a203ff2090493a000102e60fa359
powerpc/perf: Fix IMC_MAX_PMU macro

IMC_MAX_PMU is used for static storage (per_nest_pmu_arr) which holds
nest pmu information. Current value for the macro is 32 based on
the initial number of nest pmu units supported by the nest microcode.
But going forward, microcode could support more nest units. Instead
of static storage, patch to fix the code to dynamically allocate an
array based on the number of nest imc units found in the device tree.

Fixes:95ec3edcfc615 ('powerpc/powernv: Detect and create IMC device')
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/imc-pmu.h
arch/powerpc/perf/imc-pmu.c
arch/powerpc/platforms/powernv/opal-imc.c