mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 10:04:12 +08:00
92f6f2d7f5
Add nfit_test 'watermarks' for the dax_pmem, dax_pmem_core, and dax_pmem_compat modules. This causes the nfit_test module to fail loading in case any of these modules are also not overridden with the ldconfig wrapped modules. Without this, nfit_test would sometimes fail creation of device-dax namespaces on the nfit_test_bus with an unhelpful error log such as: dax_pmem dax5.0: could not reserve metadata dax_pmem: probe of dax5.0 failed with error -16 Which was caused due to the unwrapped version of devm_request_mem_region() being called. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
25 lines
707 B
C
25 lines
707 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
// Copyright(c) 2018 Intel Corporation. All rights reserved.
|
|
#ifndef _TEST_NVDIMM_WATERMARK_H_
|
|
#define _TEST_NVDIMM_WATERMARK_H_
|
|
int pmem_test(void);
|
|
int libnvdimm_test(void);
|
|
int acpi_nfit_test(void);
|
|
int device_dax_test(void);
|
|
int dax_pmem_test(void);
|
|
int dax_pmem_core_test(void);
|
|
int dax_pmem_compat_test(void);
|
|
|
|
/*
|
|
* dummy routine for nfit_test to validate it is linking to the properly
|
|
* mocked module and not the standard one from the base tree.
|
|
*/
|
|
#define nfit_test_watermark(x) \
|
|
int x##_test(void) \
|
|
{ \
|
|
pr_debug("%s for nfit_test\n", KBUILD_MODNAME); \
|
|
return 0; \
|
|
} \
|
|
EXPORT_SYMBOL(x##_test)
|
|
#endif /* _TEST_NVDIMM_WATERMARK_H_ */
|