Blame SOURCES/0183-cxl-set-partition-Accept-ram-as-an-alias-for-volatil.patch

2eb93d
From b1c29cfa125f6da219bfcec732a8290bb124cdce Mon Sep 17 00:00:00 2001
2eb93d
From: Dan Williams <dan.j.williams@intel.com>
2eb93d
Date: Thu, 14 Jul 2022 10:02:38 -0700
2eb93d
Subject: [PATCH 183/217] cxl/set-partition: Accept 'ram' as an alias for
2eb93d
 'volatile'
2eb93d
2eb93d
'ram' is a more convenient shorthand for volatile memory.
2eb93d
2eb93d
Link: https://lore.kernel.org/r/165781815878.1555691.12251226240559355924.stgit@dwillia2-xfh.jf.intel.com
2eb93d
Cc: Alison Schofield <alison.schofield@intel.com>
2eb93d
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
2eb93d
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2eb93d
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
---
2eb93d
 Documentation/cxl/cxl-set-partition.txt | 2 +-
2eb93d
 cxl/memdev.c                            | 4 +++-
2eb93d
 2 files changed, 4 insertions(+), 2 deletions(-)
2eb93d
2eb93d
diff --git a/Documentation/cxl/cxl-set-partition.txt b/Documentation/cxl/cxl-set-partition.txt
2eb93d
index 1e548af..f0126da 100644
2eb93d
--- a/Documentation/cxl/cxl-set-partition.txt
2eb93d
+++ b/Documentation/cxl/cxl-set-partition.txt
2eb93d
@@ -37,7 +37,7 @@ include::memdev-option.txt[]
2eb93d
 
2eb93d
 -t::
2eb93d
 --type=::
2eb93d
-	Type of partition, 'pmem' or 'volatile', to modify.
2eb93d
+	Type of partition, 'pmem' or 'ram' (volatile), to modify.
2eb93d
 	Default: 'pmem'
2eb93d
 
2eb93d
 -s::
2eb93d
diff --git a/cxl/memdev.c b/cxl/memdev.c
2eb93d
index 9fcd8ae..1cecad2 100644
2eb93d
--- a/cxl/memdev.c
2eb93d
+++ b/cxl/memdev.c
2eb93d
@@ -65,7 +65,7 @@ OPT_BOOLEAN('f', "force", &param.force,                                \
2eb93d
 
2eb93d
 #define SET_PARTITION_OPTIONS() \
2eb93d
 OPT_STRING('t', "type",  &param.type, "type",			\
2eb93d
-	"'pmem' or 'volatile' (Default: 'pmem')"),		\
2eb93d
+	"'pmem' or 'ram' (volatile) (Default: 'pmem')"),		\
2eb93d
 OPT_STRING('s', "size",  &param.size, "size",			\
2eb93d
 	"size in bytes (Default: all available capacity)"),	\
2eb93d
 OPT_BOOLEAN('a', "align",  &param.align,			\
2eb93d
@@ -355,6 +355,8 @@ static int action_setpartition(struct cxl_memdev *memdev,
2eb93d
 			/* default */;
2eb93d
 		else if (strcmp(param.type, "volatile") == 0)
2eb93d
 			type = CXL_SETPART_VOLATILE;
2eb93d
+		else if (strcmp(param.type, "ram") == 0)
2eb93d
+			type = CXL_SETPART_VOLATILE;
2eb93d
 		else {
2eb93d
 			log_err(&ml, "invalid type '%s'\n", param.type);
2eb93d
 			return -EINVAL;
2eb93d
-- 
2eb93d
2.27.0
2eb93d