blob: 47f9cc9dcd94b560e7f520d0f56f1284840c535c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Dan Williams9d27a872015-07-10 14:07:03 -04002ldflags-y += --wrap=ioremap_wc
Ross Zwisler67a3e8f2015-08-27 13:14:20 -06003ldflags-y += --wrap=memremap
Christoph Hellwig4bdc0d62020-01-06 09:43:50 +01004ldflags-y += --wrap=devm_ioremap
Christoph Hellwig708ab622015-08-10 23:07:08 -04005ldflags-y += --wrap=devm_memremap
Dan Williams32ab0a3f2015-08-01 02:16:37 -04006ldflags-y += --wrap=devm_memunmap
Dan Williamsc1468552019-11-13 16:22:06 -08007ldflags-y += --wrap=ioremap
Dan Williams6bc75612015-06-17 17:23:32 -04008ldflags-y += --wrap=iounmap
Ross Zwisler67a3e8f2015-08-27 13:14:20 -06009ldflags-y += --wrap=memunmap
Christoph Hellwig708ab622015-08-10 23:07:08 -040010ldflags-y += --wrap=__devm_request_region
Dan Williams200c79d2016-03-22 00:22:16 -070011ldflags-y += --wrap=__devm_release_region
Dan Williams6bc75612015-06-17 17:23:32 -040012ldflags-y += --wrap=__request_region
13ldflags-y += --wrap=__release_region
Dan Williams979fccf2015-12-15 00:34:21 -080014ldflags-y += --wrap=devm_memremap_pages
Dan Williamsee8520f2016-06-15 20:34:17 -070015ldflags-y += --wrap=insert_resource
16ldflags-y += --wrap=remove_resource
Dan Williamsc14a8682016-08-18 22:15:04 -070017ldflags-y += --wrap=acpi_evaluate_object
Dan Williamsa7de92d2016-12-05 13:43:25 -080018ldflags-y += --wrap=acpi_evaluate_dsm
Dan Williams6bc75612015-06-17 17:23:32 -040019
20DRIVERS := ../../../drivers
21NVDIMM_SRC := $(DRIVERS)/nvdimm
Dan Williamsbdf97012016-07-23 21:24:19 -070022ACPI_SRC := $(DRIVERS)/acpi/nfit
Dan Williamsab68f262016-05-18 09:15:08 -070023DAX_SRC := $(DRIVERS)/dax
Santosh Sivaraj1f776792020-01-14 11:10:51 +053024ccflags-y := -I$(srctree)/drivers/nvdimm/
25ccflags-y += -I$(srctree)/drivers/acpi/nfit/
Dan Williams6bc75612015-06-17 17:23:32 -040026
27obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
28obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
29obj-$(CONFIG_ND_BTT) += nd_btt.o
30obj-$(CONFIG_ND_BLK) += nd_blk.o
Dan Williams7a678322015-08-19 00:34:34 -040031obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o
Dan Williams6bc75612015-06-17 17:23:32 -040032obj-$(CONFIG_ACPI_NFIT) += nfit.o
Dan Williams7b6be842017-04-11 09:49:49 -070033ifeq ($(CONFIG_DAX),m)
34obj-$(CONFIG_DAX) += dax.o
35endif
36obj-$(CONFIG_DEV_DAX) += device_dax.o
Dan Williamsab68f262016-05-18 09:15:08 -070037obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem.o
Dan Williams730926c2017-07-16 13:51:53 -070038obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem_core.o
39obj-$(CONFIG_DEV_DAX_PMEM_COMPAT) += dax_pmem_compat.o
Dan Williams6bc75612015-06-17 17:23:32 -040040
Dan Williamsbdf97012016-07-23 21:24:19 -070041nfit-y := $(ACPI_SRC)/core.o
Dave Jiangf2989392018-12-05 23:39:29 -080042nfit-y += $(ACPI_SRC)/intel.o
Vishal Verma6839a6d2016-07-23 21:51:21 -070043nfit-$(CONFIG_X86_MCE) += $(ACPI_SRC)/mce.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080044nfit-y += acpi_nfit_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040045nfit-y += config_check.o
46
47nd_pmem-y := $(NVDIMM_SRC)/pmem.o
Dan Williamsf295e532016-06-17 11:08:06 -070048nd_pmem-y += pmem-dax.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080049nd_pmem-y += pmem_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040050nd_pmem-y += config_check.o
51
52nd_btt-y := $(NVDIMM_SRC)/btt.o
53nd_btt-y += config_check.o
54
55nd_blk-y := $(NVDIMM_SRC)/blk.o
56nd_blk-y += config_check.o
57
Dan Williams7a678322015-08-19 00:34:34 -040058nd_e820-y := $(NVDIMM_SRC)/e820.o
59nd_e820-y += config_check.o
60
Dan Williams7b6be842017-04-11 09:49:49 -070061dax-y := $(DAX_SRC)/super.o
Dan Williams51cf7842017-07-12 17:58:21 -070062dax-y += $(DAX_SRC)/bus.o
Dan Williamsab68f262016-05-18 09:15:08 -070063dax-y += config_check.o
64
Dan Williams7b6be842017-04-11 09:49:49 -070065device_dax-y := $(DAX_SRC)/device.o
Dan Williams73616362017-05-04 23:38:43 -070066device_dax-y += dax-dev.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080067device_dax-y += device_dax_test.o
Dan Williams7b6be842017-04-11 09:49:49 -070068device_dax-y += config_check.o
69
Dan Williams730926c2017-07-16 13:51:53 -070070dax_pmem-y := $(DAX_SRC)/pmem/pmem.o
Vishal Verma92f6f2d2019-03-18 19:06:29 -060071dax_pmem-y += dax_pmem_test.o
Dan Williams730926c2017-07-16 13:51:53 -070072dax_pmem_core-y := $(DAX_SRC)/pmem/core.o
Vishal Verma92f6f2d2019-03-18 19:06:29 -060073dax_pmem_core-y += dax_pmem_core_test.o
Dan Williams730926c2017-07-16 13:51:53 -070074dax_pmem_compat-y := $(DAX_SRC)/pmem/compat.o
Vishal Verma92f6f2d2019-03-18 19:06:29 -060075dax_pmem_compat-y += dax_pmem_compat_test.o
Dan Williamsab68f262016-05-18 09:15:08 -070076dax_pmem-y += config_check.o
77
Dan Williams6bc75612015-06-17 17:23:32 -040078libnvdimm-y := $(NVDIMM_SRC)/core.o
79libnvdimm-y += $(NVDIMM_SRC)/bus.o
80libnvdimm-y += $(NVDIMM_SRC)/dimm_devs.o
81libnvdimm-y += $(NVDIMM_SRC)/dimm.o
82libnvdimm-y += $(NVDIMM_SRC)/region_devs.o
83libnvdimm-y += $(NVDIMM_SRC)/region.o
84libnvdimm-y += $(NVDIMM_SRC)/namespace_devs.o
85libnvdimm-y += $(NVDIMM_SRC)/label.o
Dave Jiangaa9ad442017-08-23 12:48:26 -070086libnvdimm-y += $(NVDIMM_SRC)/badrange.o
Dan Williamse1455742015-07-30 17:57:47 -040087libnvdimm-$(CONFIG_ND_CLAIM) += $(NVDIMM_SRC)/claim.o
Dan Williams6bc75612015-06-17 17:23:32 -040088libnvdimm-$(CONFIG_BTT) += $(NVDIMM_SRC)/btt_devs.o
Dan Williamse1455742015-07-30 17:57:47 -040089libnvdimm-$(CONFIG_NVDIMM_PFN) += $(NVDIMM_SRC)/pfn_devs.o
Dan Williamscd034122016-03-11 10:15:36 -080090libnvdimm-$(CONFIG_NVDIMM_DAX) += $(NVDIMM_SRC)/dax_devs.o
Dave Jiang4c6926a2018-12-06 12:40:01 -080091libnvdimm-$(CONFIG_NVDIMM_KEYS) += $(NVDIMM_SRC)/security.o
Dave Jiang3c13e2a2018-12-10 13:20:42 -070092libnvdimm-y += dimm_devs.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080093libnvdimm-y += libnvdimm_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040094libnvdimm-y += config_check.o
95
96obj-m += test/