Commit 92f6f2d7 authored by Vishal Verma's avatar Vishal Verma Committed by Dan Williams
Browse files

tools/testing/nvdimm: add watermarks for dax_pmem* modules



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: default avatarVishal Verma <vishal.l.verma@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent d521fbae
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -68,8 +68,11 @@ device_dax-y += device_dax_test.o
device_dax-y += config_check.o

dax_pmem-y := $(DAX_SRC)/pmem/pmem.o
dax_pmem-y += dax_pmem_test.o
dax_pmem_core-y := $(DAX_SRC)/pmem/core.o
dax_pmem_core-y += dax_pmem_core_test.o
dax_pmem_compat-y := $(DAX_SRC)/pmem/compat.o
dax_pmem_compat-y += dax_pmem_compat_test.o
dax_pmem-y += config_check.o

libnvdimm-y := $(NVDIMM_SRC)/core.o
+8 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// Copyright(c) 2019 Intel Corporation. All rights reserved.

#include <linux/module.h>
#include <linux/printk.h>
#include "watermark.h"

nfit_test_watermark(dax_pmem_compat);
+8 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// Copyright(c) 2019 Intel Corporation. All rights reserved.

#include <linux/module.h>
#include <linux/printk.h>
#include "watermark.h"

nfit_test_watermark(dax_pmem_core);
+8 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// Copyright(c) 2019 Intel Corporation. All rights reserved.

#include <linux/module.h>
#include <linux/printk.h>
#include "watermark.h"

nfit_test_watermark(dax_pmem);
+3 −0
Original line number Diff line number Diff line
@@ -3171,6 +3171,9 @@ static __init int nfit_test_init(void)
	acpi_nfit_test();
	device_dax_test();
	mcsafe_test();
	dax_pmem_test();
	dax_pmem_core_test();
	dax_pmem_compat_test();

	nfit_test_setup(nfit_test_lookup, nfit_test_evaluate_dsm);

Loading