On 9/21/2022 1:15 PM, Davidlohr Bueso wrote:
On Wed, 21 Sep 2022, Dave Jiang wrote:

+static int cxl_pmem_security_passphrase_erase(struct nvdimm *nvdimm,
+                          const struct nvdimm_key_data *key,
+                          enum nvdimm_passphrase_type ptype)
+{
+    struct cxl_nvdimm *cxl_nvd = nvdimm_provider_data(nvdimm);
+    struct cxl_memdev *cxlmd = cxl_nvd->cxlmd;
+    struct cxl_dev_state *cxlds = cxlmd->cxlds;
+    struct cxl_pass_erase erase;
+    int rc;
+
+    if (!cpu_cache_has_invalidate_memregion())
+        return -EOPNOTSUPP;

The error code should be the same as the nvdimm user. I went with EINVAL, but
don't really have strong preferences.


EOPNOTSUPP seems more appropriate?


Reply via email to