Vishal Verma wrote:
> Add cxl_region -> json and cxl_mapping -> json emitter helpers, and
> teach cxl_filter_walk about cxl_regions. With these in place, 'cxl-list'
> can now emit json objects for CXL regions. They can be top-level objects
> if requested by themselves, or nested under root-decoders, if listed
> along with decoders. Allow a plain 'cxl list' command to imply
> '--regions'.
> 
> Cc: Dan Williams <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>
> ---
>  Documentation/cxl/cxl-list.txt |  13 ++-
>  cxl/filter.h                   |   4 +
>  cxl/json.h                     |   5 ++
>  cxl/filter.c                   | 158 +++++++++++++++++++++++++++++++--
>  cxl/json.c                     | 123 +++++++++++++++++++++++++
>  cxl/list.c                     |  25 +++---
>  6 files changed, 304 insertions(+), 24 deletions(-)
> 
> diff --git a/Documentation/cxl/cxl-list.txt b/Documentation/cxl/cxl-list.txt
> index f6aba0c..2906c2f 100644
> --- a/Documentation/cxl/cxl-list.txt
> +++ b/Documentation/cxl/cxl-list.txt
> @@ -309,8 +309,9 @@ OPTIONS
>  
>  -T::
>  --targets::
> -     Extend decoder listings with downstream port target information, and /
> -     or port and bus listings with the downstream port information.
> +     Extend decoder listings with downstream port target information, port
> +     and bus listings with the downstream port information, and / or regions
> +     with mapping information.
>  ----
>  # cxl list -BTu -b ACPI.CXL
>  {
> @@ -327,6 +328,14 @@ OPTIONS
>  }
>  ----
>  
> +-R::
> +--regions::
> +     Include region objects in the listing.
> +
> +-r::
> +--region::
> +     Specify the region name to filter the emitted regions.

Should this match the template of the other filter options, i.e.:

"Specify CXL region device name(s), or device id(s), to filter the
listing."

...because -r may be a list and it may filter more than just emitted regions.

Other than that, it looks good to me.

Reviewed-by: Dan Williams <[email protected]>

Reply via email to