Vishal Verma wrote:
> Add libcxl APIs to create a region under a given root decoder, and to
> set different attributes for the new region. These allow setting the
> size, interleave_ways, interleave_granularity, uuid, and the target
> devices for the newly minted cxl_region object.
> 
> Cc: Dan Williams <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>
[..]
> +
> +CXL_EXPORT int cxl_region_commit(struct cxl_region *region)
> +{
> +     return do_region_commit(region, CXL_REGION_COMMIT);
> +}
> +
> +CXL_EXPORT int cxl_region_decommit(struct cxl_region *region)
> +{
> +     return do_region_commit(region, CXL_REGION_DECOMMIT);
> +}

Oh, here is a case where the "decommit" term escapes into the wild. I
think these should be cxl_region_decode_commit() and
cxl_region_decode_reset().

[..]
> diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
> index 47c1695..f1062b6 100644
> --- a/cxl/lib/libcxl.sym
> +++ b/cxl/lib/libcxl.sym
> @@ -140,6 +140,7 @@ global:
>       cxl_decoder_is_mem_capable;
>       cxl_decoder_is_accelmem_capable;
>       cxl_decoder_is_locked;
> +     cxl_decoder_create_pmem_region;
>       cxl_target_get_first;
>       cxl_target_get_next;
>       cxl_target_get_decoder;
> @@ -183,6 +184,7 @@ global:
>       cxl_region_is_enabled;
>       cxl_region_disable;
>       cxl_region_enable;
> +     cxl_region_delete;
>       cxl_region_get_ctx;
>       cxl_region_get_decoder;
>       cxl_region_get_id;
> @@ -192,9 +194,23 @@ global:
>       cxl_region_get_resource;
>       cxl_region_get_interleave_ways;
>       cxl_region_get_interleave_granularity;
> +     cxl_region_get_target_decoder;
> +     cxl_region_set_size;
> +     cxl_region_set_uuid;
> +     cxl_region_set_interleave_ways;
> +     cxl_region_set_interleave_granularity;
> +     cxl_region_set_target;
> +     cxl_region_clear_target;
> +     cxl_region_clear_all_targets;
> +     cxl_region_commit;
> +     cxl_region_decommit;
>       cxl_mapping_get_first;
>       cxl_mapping_get_next;
>       cxl_mapping_get_decoder;
>       cxl_mapping_get_region;
>       cxl_mapping_get_position;
> +     cxl_decoder_get_by_name;
> +     cxl_ep_decoder_get_memdev;
> +     cxl_decoder_get_interleave_granularity;
> +     cxl_decoder_get_interleave_ways;
>  } LIBCXL_2;

I had been adding small blurbs to Documentation/cxl/lib/libcxl.txt for
new API additions. We can handle a REGION section in that document as an
incremental follow-on.

Reply via email to