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