summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dax/super.c10
-rw-r--r--fs/Kconfig1
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 97ef2a9d878d..7643b1a078d9 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -451,6 +451,16 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops)
dev_t devt;
int minor;
+ /*
+ * Unavailable on architectures with virtually aliased data caches,
+ * except for device-dax (NULL operations pointer), which does
+ * not use aliased mappings from the kernel.
+ */
+ if (ops && (IS_ENABLED(CONFIG_ARM) ||
+ IS_ENABLED(CONFIG_MIPS) ||
+ IS_ENABLED(CONFIG_SPARC)))
+ return ERR_PTR(-EOPNOTSUPP);
+
if (WARN_ON_ONCE(ops && !ops->zero_page_range))
return ERR_PTR(-EINVAL);
diff --git a/fs/Kconfig b/fs/Kconfig
index 89fdbefd1075..713c8655fa0a 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -60,7 +60,6 @@ endif # BLOCK
config FS_DAX
bool "File system based Direct Access (DAX) support"
depends on MMU
- depends on !(ARM || MIPS || SPARC)
depends on ZONE_DEVICE || FS_DAX_LIMITED
select FS_IOMAP
select DAX