]> Git Repo - linux.git/blobdiff - drivers/misc/cxl/sysfs.c
crypto: skcipher - remove the exporting of skcipher_walk_next
[linux.git] / drivers / misc / cxl / sysfs.c
index 4b5a4c5d3c012dff77508b9f0b8b9883671e594c..629e2e156412487d99edf30ae825b9e3cf790072 100644 (file)
@@ -353,12 +353,20 @@ static ssize_t prefault_mode_store(struct device *device,
        struct cxl_afu *afu = to_cxl_afu(device);
        enum prefault_modes mode = -1;
 
-       if (!strncmp(buf, "work_element_descriptor", 23))
-               mode = CXL_PREFAULT_WED;
-       if (!strncmp(buf, "all", 3))
-               mode = CXL_PREFAULT_ALL;
        if (!strncmp(buf, "none", 4))
                mode = CXL_PREFAULT_NONE;
+       else {
+               if (!radix_enabled()) {
+
+                       /* only allowed when not in radix mode */
+                       if (!strncmp(buf, "work_element_descriptor", 23))
+                               mode = CXL_PREFAULT_WED;
+                       if (!strncmp(buf, "all", 3))
+                               mode = CXL_PREFAULT_ALL;
+               } else {
+                       dev_err(device, "Cannot prefault with radix enabled\n");
+               }
+       }
 
        if (mode == -1)
                return -EINVAL;
This page took 0.040279 seconds and 4 git commands to generate.