aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hv
diff options
context:
space:
mode:
authorKajol Jain <kjain@linux.ibm.com>2022-03-23 22:15:50 +0530
committerDan Williams <dan.j.williams@intel.com>2022-03-23 12:17:36 -0700
commitd0007eb15c2a8113e847143c783ea83d93963741 (patch)
treeebcb803acab486691cabcdd1df0245cd251cc6f8 /tools/hv
parentde7a9e949f4f094741f708cd05572f932d009d02 (diff)
downloadlinux-d0007eb15c2a8113e847143c783ea83d93963741.tar.gz
powerpc/papr_scm: Fix build failure when
The following build failure occurs when CONFIG_PERF_EVENTS is not set as generic pmu functions are not visible in that scenario. arch/powerpc/platforms/pseries/papr_scm.c:372:35: error: ‘struct perf_event’ has no member named ‘attr’ p->nvdimm_events_map[event->attr.config], ^~ In file included from ./include/linux/list.h:5, from ./include/linux/kobject.h:19, from ./include/linux/of.h:17, from arch/powerpc/platforms/pseries/papr_scm.c:5: arch/powerpc/platforms/pseries/papr_scm.c: In function ‘papr_scm_pmu_event_init’: arch/powerpc/platforms/pseries/papr_scm.c:389:49: error: ‘struct perf_event’ has no member named ‘pmu’ struct nvdimm_pmu *nd_pmu = to_nvdimm_pmu(event->pmu); ^~ ./include/linux/container_of.h:18:26: note: in definition of macro ‘container_of’ void *__mptr = (void *)(ptr); \ ^~~ arch/powerpc/platforms/pseries/papr_scm.c:389:30: note: in expansion of macro ‘to_nvdimm_pmu’ struct nvdimm_pmu *nd_pmu = to_nvdimm_pmu(event->pmu); ^~~~~~~~~~~~~ In file included from ./include/linux/bits.h:22, from ./include/linux/bitops.h:6, from ./include/linux/of.h:15, from arch/powerpc/platforms/pseries/papr_scm.c:5: Fix the build issue by adding check for CONFIG_PERF_EVENTS config option and also add stub function for papr_scm_pmu_register to handle the CONFIG_PERF_EVENTS=n case. Also move the position of macro "to_nvdimm_pmu" inorder to merge it in CONFIG_PERF_EVENTS=y block. based on libnvdimm-for-next tree) Fixes: 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support") (Commit id Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Link: https://lore.kernel.org/r/20220323164550.109768-2-kjain@linux.ibm.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/hv')
0 files changed, 0 insertions, 0 deletions