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>
This commit is contained in:

committed by
Michael Ellerman

parent
de34787f10
commit
73ce9aec65
@@ -20,11 +20,6 @@
|
||||
#include <linux/io.h>
|
||||
#include <asm/opal.h>
|
||||
|
||||
/*
|
||||
* For static allocation of some of the structures.
|
||||
*/
|
||||
#define IMC_MAX_PMUS 32
|
||||
|
||||
/*
|
||||
* Compatibility macros for IMC devices
|
||||
*/
|
||||
@@ -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 */
|
||||
|
Reference in New Issue
Block a user