blob: c57d9e9d448039db265c0179aa584ba1b33375ce [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 Williamsee8520fe2016-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 Williams6bc75612015-06-17 17:23:32 -040038
Dan Williamsbdf97012016-07-23 21:24:19 -070039nfit-y := $(ACPI_SRC)/core.o
Dave Jiangf2989392018-12-05 23:39:29 -080040nfit-y += $(ACPI_SRC)/intel.o
Vishal Verma6839a6d2016-07-23 21:51:21 -070041nfit-$(CONFIG_X86_MCE) += $(ACPI_SRC)/mce.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080042nfit-y += acpi_nfit_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040043nfit-y += config_check.o
44
45nd_pmem-y := $(NVDIMM_SRC)/pmem.o
Dan Williamsf295e532016-06-17 11:08:06 -070046nd_pmem-y += pmem-dax.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080047nd_pmem-y += pmem_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040048nd_pmem-y += config_check.o
49
50nd_btt-y := $(NVDIMM_SRC)/btt.o
51nd_btt-y += config_check.o
52
53nd_blk-y := $(NVDIMM_SRC)/blk.o
54nd_blk-y += config_check.o
55
Dan Williams7a678322015-08-19 00:34:34 -040056nd_e820-y := $(NVDIMM_SRC)/e820.o
57nd_e820-y += config_check.o
58
Dan Williams7b6be842017-04-11 09:49:49 -070059dax-y := $(DAX_SRC)/super.o
Dan Williams51cf7842017-07-12 17:58:21 -070060dax-y += $(DAX_SRC)/bus.o
Dan Williamsab68f262016-05-18 09:15:08 -070061dax-y += config_check.o
62
Dan Williams7b6be842017-04-11 09:49:49 -070063device_dax-y := $(DAX_SRC)/device.o
Dan Williams73616362017-05-04 23:38:43 -070064device_dax-y += dax-dev.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080065device_dax-y += device_dax_test.o
Dan Williams7b6be842017-04-11 09:49:49 -070066device_dax-y += config_check.o
67
Dan Williams83762cb2021-11-15 13:20:57 -080068dax_pmem-y := $(DAX_SRC)/pmem.o
Vishal Verma92f6f2d2019-03-18 19:06:29 -060069dax_pmem-y += dax_pmem_test.o
Dan Williamsab68f262016-05-18 09:15:08 -070070dax_pmem-y += config_check.o
71
Dan Williams6bc75612015-06-17 17:23:32 -040072libnvdimm-y := $(NVDIMM_SRC)/core.o
73libnvdimm-y += $(NVDIMM_SRC)/bus.o
74libnvdimm-y += $(NVDIMM_SRC)/dimm_devs.o
75libnvdimm-y += $(NVDIMM_SRC)/dimm.o
76libnvdimm-y += $(NVDIMM_SRC)/region_devs.o
77libnvdimm-y += $(NVDIMM_SRC)/region.o
78libnvdimm-y += $(NVDIMM_SRC)/namespace_devs.o
79libnvdimm-y += $(NVDIMM_SRC)/label.o
Dave Jiangaa9ad442017-08-23 12:48:26 -070080libnvdimm-y += $(NVDIMM_SRC)/badrange.o
Dan Williamse1455742015-07-30 17:57:47 -040081libnvdimm-$(CONFIG_ND_CLAIM) += $(NVDIMM_SRC)/claim.o
Dan Williams6bc75612015-06-17 17:23:32 -040082libnvdimm-$(CONFIG_BTT) += $(NVDIMM_SRC)/btt_devs.o
Dan Williamse1455742015-07-30 17:57:47 -040083libnvdimm-$(CONFIG_NVDIMM_PFN) += $(NVDIMM_SRC)/pfn_devs.o
Dan Williamscd034122016-03-11 10:15:36 -080084libnvdimm-$(CONFIG_NVDIMM_DAX) += $(NVDIMM_SRC)/dax_devs.o
Dave Jiang4c6926a2018-12-06 12:40:01 -080085libnvdimm-$(CONFIG_NVDIMM_KEYS) += $(NVDIMM_SRC)/security.o
Dave Jiang3c13e2a2018-12-10 13:20:42 -070086libnvdimm-y += dimm_devs.o
Dan Williams0fb5c8d2018-02-01 12:28:54 -080087libnvdimm-y += libnvdimm_test.o
Dan Williams6bc75612015-06-17 17:23:32 -040088libnvdimm-y += config_check.o
89
90obj-m += test/