mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
The following build failure occurs when CONFIG_PERF_EVENTS is not set
as generic pmu functions are not visible in that scenario.
|-- s390-randconfig-r044-20220313
| |-- nd_perf.c:(.text):undefined-reference-to-perf_pmu_migrate_context
| |-- nd_perf.c:(.text):undefined-reference-to-perf_pmu_register
| `-- nd_perf.c:(.text):undefined-reference-to-perf_pmu_unregister
Similar build failure in nds32 architecture:
nd_perf.c:(.text+0x21e): undefined reference to `perf_pmu_migrate_context'
nd_perf.c:(.text+0x434): undefined reference to `perf_pmu_register'
nd_perf.c:(.text+0x57c): undefined reference to `perf_pmu_unregister'
Fix this issue by adding check for CONFIG_PERF_EVENTS config option
and disabling the nvdimm perf interface incase this config is not set.
Also remove function declaration of perf_pmu_migrate_context,
perf_pmu_register, perf_pmu_unregister functions from nd.h as these are
common pmu functions which are part of perf_event.h and since we
are disabling nvdimm perf interface incase CONFIG_PERF_EVENTS option
is not set, we not need to declare them in nd.h
Also move the platform_device header file addition part from nd.h to
nd_perf.c and add stub functions for register_nvdimm_pmu and
unregister_nvdimm_pmu functions to handle CONFIG_PERF_EVENTS=n
case.
Fixes:
|
||
|---|---|---|
| .. | ||
| badrange.c | ||
| btt_devs.c | ||
| btt.c | ||
| btt.h | ||
| bus.c | ||
| claim.c | ||
| core.c | ||
| dax_devs.c | ||
| dimm_devs.c | ||
| dimm.c | ||
| e820.c | ||
| Kconfig | ||
| label.c | ||
| label.h | ||
| Makefile | ||
| namespace_devs.c | ||
| nd_perf.c | ||
| nd_virtio.c | ||
| nd-core.h | ||
| nd.h | ||
| of_pmem.c | ||
| pfn_devs.c | ||
| pfn.h | ||
| pmem.c | ||
| pmem.h | ||
| region_devs.c | ||
| region.c | ||
| security.c | ||
| virtio_pmem.c | ||
| virtio_pmem.h | ||