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

Commit 36092ee8 authored by Dan Williams's avatar Dan Williams
Browse files

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

parents 1b982baf 03dca343
Loading
Loading
Loading
Loading
+0 −32
Original line number Original line Diff line number Diff line
@@ -407,35 +407,6 @@ static inline int is_unrecognized_ioctl(int ret)
		ret == -ENOIOCTLCMD;
		ret == -ENOIOCTLCMD;
}
}


#ifdef CONFIG_FS_DAX
bool blkdev_dax_capable(struct block_device *bdev)
{
	struct gendisk *disk = bdev->bd_disk;

	if (!disk->fops->direct_access)
		return false;

	/*
	 * If the partition is not aligned on a page boundary, we can't
	 * do dax I/O to it.
	 */
	if ((bdev->bd_part->start_sect % (PAGE_SIZE / 512))
			|| (bdev->bd_part->nr_sects % (PAGE_SIZE / 512)))
		return false;

	/*
	 * If the device has known bad blocks, force all I/O through the
	 * driver / page cache.
	 *
	 * TODO: support finer grained dax error handling
	 */
	if (disk->bb && disk->bb->count)
		return false;

	return true;
}
#endif

static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode,
static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode,
		unsigned cmd, unsigned long arg)
		unsigned cmd, unsigned long arg)
{
{
@@ -598,9 +569,6 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
	case BLKTRACESETUP:
	case BLKTRACESETUP:
	case BLKTRACETEARDOWN:
	case BLKTRACETEARDOWN:
		return blk_trace_ioctl(bdev, cmd, argp);
		return blk_trace_ioctl(bdev, cmd, argp);
	case BLKDAXGET:
		return put_int(arg, !!(bdev->bd_inode->i_flags & S_DAX));
		break;
	case IOC_PR_REGISTER:
	case IOC_PR_REGISTER:
		return blkdev_pr_register(bdev, argp);
		return blkdev_pr_register(bdev, argp);
	case IOC_PR_RESERVE:
	case IOC_PR_RESERVE:
+2 −0
Original line number Original line Diff line number Diff line
@@ -190,6 +190,8 @@ source "drivers/android/Kconfig"


source "drivers/nvdimm/Kconfig"
source "drivers/nvdimm/Kconfig"


source "drivers/dax/Kconfig"

source "drivers/nvmem/Kconfig"
source "drivers/nvmem/Kconfig"


source "drivers/hwtracing/stm/Kconfig"
source "drivers/hwtracing/stm/Kconfig"
+1 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,7 @@ obj-$(CONFIG_PARPORT) += parport/
obj-$(CONFIG_NVM)		+= lightnvm/
obj-$(CONFIG_NVM)		+= lightnvm/
obj-y				+= base/ block/ misc/ mfd/ nfc/
obj-y				+= base/ block/ misc/ mfd/ nfc/
obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
obj-$(CONFIG_DEV_DAX)		+= dax/
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
obj-$(CONFIG_NUBUS)		+= nubus/
obj-$(CONFIG_NUBUS)		+= nubus/
obj-y				+= macintosh/
obj-y				+= macintosh/

drivers/dax/Kconfig

0 → 100644
+26 −0
Original line number Original line Diff line number Diff line
menuconfig DEV_DAX
	tristate "DAX: direct access to differentiated memory"
	default m if NVDIMM_DAX
	depends on TRANSPARENT_HUGEPAGE
	help
	  Support raw access to differentiated (persistence, bandwidth,
	  latency...) memory via an mmap(2) capable character
	  device.  Platform firmware or a device driver may identify a
	  platform memory resource that is differentiated from the
	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
	  restrictions that make the mapping behavior deterministic.

if DEV_DAX

config DEV_DAX_PMEM
	tristate "PMEM DAX: direct access to persistent memory"
	depends on NVDIMM_DAX
	default DEV_DAX
	help
	  Support raw access to persistent memory.  Note that this
	  driver consumes memory ranges allocated and exported by the
	  libnvdimm sub-system.

	  Say Y if unsure

endif

drivers/dax/Makefile

0 → 100644
+4 −0
Original line number Original line Diff line number Diff line
obj-$(CONFIG_DEV_DAX) += dax.o
obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem.o

dax_pmem-y := pmem.o
Loading