diff mbox series

[-next] drivers/nvdimm: Fix build error without PERF_EVENTS

Message ID 20220324080653.1364201-1-zhengbin13@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] drivers/nvdimm: Fix build error without PERF_EVENTS | expand

Commit Message

Zheng Bin March 24, 2022, 8:06 a.m. UTC
If PERF_EVENTS is not set, bulding fails:

drivers/nvdimm/nd_perf.o: In function `nvdimm_pmu_cpu_offline':
nd_perf.c:(.text+0x12c): undefined reference to `perf_pmu_migrate_context'
drivers/nvdimm/nd_perf.o: In function `register_nvdimm_pmu':
nd_perf.c:(.text+0x3c4): undefined reference to `perf_pmu_register'
drivers/nvdimm/nd_perf.o: In function `unregister_nvdimm_pmu':
nd_perf.c:(.text+0x4c0): undefined reference to `perf_pmu_unregister'

Make LIBNVDIMM depends on PERF_EVENTS to fix this.

Fixes: 0fab1ba6ad6b ("drivers/nvdimm: Add perf interface to expose nvdimm performance stats")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/nvdimm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

--
2.31.1
diff mbox series

Patch

diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index 5a29046e3319..e93bd0b787e9 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -4,6 +4,7 @@  menuconfig LIBNVDIMM
 	depends on PHYS_ADDR_T_64BIT
 	depends on HAS_IOMEM
 	depends on BLK_DEV
+	depends on PERF_EVENTS
 	select MEMREGION
 	help
 	  Generic support for non-volatile memory devices including