Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e13e75b8 authored by Dan Williams's avatar Dan Williams
Browse files

Merge branch 'for-4.17/dax' into libnvdimm-for-next

parents 1ed41b56 976431b0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1766,6 +1766,17 @@

			nohz
			  Disable the tick when a single task runs.

			  A residual 1Hz tick is offloaded to workqueues, which you
			  need to affine to housekeeping through the global
			  workqueue's affinity configured via the
			  /sys/devices/virtual/workqueue/cpumask sysfs file, or
			  by using the 'domain' flag described below.

			  NOTE: by default the global workqueue runs on all CPUs,
			  so to protect individual CPUs the 'cpumask' file has to
			  be configured manually after bootup.

			domain
			  Isolate from the general SMP balancing and scheduling
			  algorithms. Note that performing domain isolation this way
+4 −1
Original line number Diff line number Diff line
config DAX_DRIVER
	select DAX
	bool

menuconfig DAX
	tristate "DAX: direct access to differentiated memory"
	select SRCU
@@ -16,7 +20,6 @@ config DEV_DAX
	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
	  restrictions that make the mapping behavior deterministic.


config DEV_DAX_PMEM
	tristate "PMEM DAX: direct access to persistent memory"
	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
+12 −3
Original line number Diff line number Diff line
@@ -124,10 +124,19 @@ int __bdev_dax_supported(struct super_block *sb, int blocksize)
		return len < 0 ? len : -EIO;
	}

	if ((IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn))
			|| pfn_t_devmap(pfn))
	if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
		/*
		 * An arch that has enabled the pmem api should also
		 * have its drivers support pfn_t_devmap()
		 *
		 * This is a developer warning and should not trigger in
		 * production. dax_flush() will crash since it depends
		 * on being able to do (page_address(pfn_to_page())).
		 */
		WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
	} else if (pfn_t_devmap(pfn)) {
		/* pass */;
	else {
	} else {
		pr_debug("VFS (%s): error: dax support not enabled\n",
				sb->s_id);
		return -EOPNOTSUPP;
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ config BLK_DEV_DM_BUILTIN
config BLK_DEV_DM
	tristate "Device mapper support"
	select BLK_DEV_DM_BUILTIN
	select DAX
	depends on DAX || DAX=n
	---help---
	  Device-mapper is a low level volume manager.  It works by allowing
	  people to specify mappings for ranges of logical sectors.  Various
+6 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ static int linear_iterate_devices(struct dm_target *ti,
	return fn(ti, lc->dev, lc->start, ti->len, data);
}

#if IS_ENABLED(CONFIG_DAX_DRIVER)
static long linear_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
		long nr_pages, void **kaddr, pfn_t *pfn)
{
@@ -184,6 +185,11 @@ static size_t linear_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff,
	return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i);
}

#else
#define linear_dax_direct_access NULL
#define linear_dax_copy_from_iter NULL
#endif

static struct target_type linear_target = {
	.name   = "linear",
	.version = {1, 4, 0},
Loading