Message ID | 165765288979.435671.2636624998478988147.stgit@dwillia2-xfh (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | cxl: Region provisioning foundation | expand |
On Tue, 12 Jul 2022, Dan Williams wrote: >'ram' is a more convenient shorthand for volatile memory. Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> > >Cc: Alison Schofield <alison.schofield@intel.com> >Signed-off-by: Dan Williams <dan.j.williams@intel.com> >--- > Documentation/cxl/cxl-set-partition.txt | 2 +- > cxl/memdev.c | 4 +++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Documentation/cxl/cxl-set-partition.txt b/Documentation/cxl/cxl-set-partition.txt >index 1e548af77da2..f0126daf808b 100644 >--- a/Documentation/cxl/cxl-set-partition.txt >+++ b/Documentation/cxl/cxl-set-partition.txt >@@ -37,7 +37,7 @@ include::memdev-option.txt[] > > -t:: > --type=:: >- Type of partition, 'pmem' or 'volatile', to modify. >+ Type of partition, 'pmem' or 'ram' (volatile), to modify. > Default: 'pmem' > > -s:: >diff --git a/cxl/memdev.c b/cxl/memdev.c >index 9fcd8ae5724b..1cecad2dba4b 100644 >--- a/cxl/memdev.c >+++ b/cxl/memdev.c >@@ -65,7 +65,7 @@ OPT_BOOLEAN('f', "force", ¶m.force, \ > > #define SET_PARTITION_OPTIONS() \ > OPT_STRING('t', "type", ¶m.type, "type", \ >- "'pmem' or 'volatile' (Default: 'pmem')"), \ >+ "'pmem' or 'ram' (volatile) (Default: 'pmem')"), \ > OPT_STRING('s', "size", ¶m.size, "size", \ > "size in bytes (Default: all available capacity)"), \ > OPT_BOOLEAN('a', "align", ¶m.align, \ >@@ -355,6 +355,8 @@ static int action_setpartition(struct cxl_memdev *memdev, > /* default */; > else if (strcmp(param.type, "volatile") == 0) > type = CXL_SETPART_VOLATILE; >+ else if (strcmp(param.type, "ram") == 0) >+ type = CXL_SETPART_VOLATILE; > else { > log_err(&ml, "invalid type '%s'\n", param.type); > return -EINVAL; >
diff --git a/Documentation/cxl/cxl-set-partition.txt b/Documentation/cxl/cxl-set-partition.txt index 1e548af77da2..f0126daf808b 100644 --- a/Documentation/cxl/cxl-set-partition.txt +++ b/Documentation/cxl/cxl-set-partition.txt @@ -37,7 +37,7 @@ include::memdev-option.txt[] -t:: --type=:: - Type of partition, 'pmem' or 'volatile', to modify. + Type of partition, 'pmem' or 'ram' (volatile), to modify. Default: 'pmem' -s:: diff --git a/cxl/memdev.c b/cxl/memdev.c index 9fcd8ae5724b..1cecad2dba4b 100644 --- a/cxl/memdev.c +++ b/cxl/memdev.c @@ -65,7 +65,7 @@ OPT_BOOLEAN('f', "force", ¶m.force, \ #define SET_PARTITION_OPTIONS() \ OPT_STRING('t', "type", ¶m.type, "type", \ - "'pmem' or 'volatile' (Default: 'pmem')"), \ + "'pmem' or 'ram' (volatile) (Default: 'pmem')"), \ OPT_STRING('s', "size", ¶m.size, "size", \ "size in bytes (Default: all available capacity)"), \ OPT_BOOLEAN('a', "align", ¶m.align, \ @@ -355,6 +355,8 @@ static int action_setpartition(struct cxl_memdev *memdev, /* default */; else if (strcmp(param.type, "volatile") == 0) type = CXL_SETPART_VOLATILE; + else if (strcmp(param.type, "ram") == 0) + type = CXL_SETPART_VOLATILE; else { log_err(&ml, "invalid type '%s'\n", param.type); return -EINVAL;
'ram' is a more convenient shorthand for volatile memory. Cc: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- Documentation/cxl/cxl-set-partition.txt | 2 +- cxl/memdev.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)