diff options
author | Madhavan Srinivasan <maddy@linux.vnet.ibm.com> | 2017-11-22 10:45:39 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-22 23:04:23 +1100 |
commit | 73ce9aec65b17433e18163d07eb5cb6bf114bd6c (patch) | |
tree | 5542875410b1fb049b34625245de3bfa10f708c6 /arch/powerpc/include/asm/imc-pmu.h | |
parent | de34787f1096cce38e2590be0013b44418d14546 (diff) | |
download | linux-73ce9aec65b17433e18163d07eb5cb6bf114bd6c.tar.bz2 |
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:8f95faaac56c1 ('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>
Diffstat (limited to 'arch/powerpc/include/asm/imc-pmu.h')
-rw-r--r-- | arch/powerpc/include/asm/imc-pmu.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/imc-pmu.h b/arch/powerpc/include/asm/imc-pmu.h index 7f74c282710f..fad0e6ff460f 100644 --- a/arch/powerpc/include/asm/imc-pmu.h +++ b/arch/powerpc/include/asm/imc-pmu.h @@ -21,11 +21,6 @@ #include <asm/opal.h> /* - * For static allocation of some of the structures. - */ -#define IMC_MAX_PMUS 32 - -/* * Compatibility macros for IMC devices */ #define IMC_DTB_COMPAT "ibm,opal-in-memory-counters" @@ -125,4 +120,5 @@ enum { extern int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id); extern void thread_imc_disable(void); +extern int get_max_nest_dev(void); #endif /* __ASM_POWERPC_IMC_PMU_H */ |