Skip to content

Commit 2bde6db

Browse files
committed
cxl/region: Delete 'region' attribute from root decoders
For switch and endpoint decoders the relationship of decoders to regions is 1:1. However, for root decoders the relationship is 1:N. Also, regions are already children of root decoders, so the 1:N relationship is observed by walking the following glob: /sys/bus/cxl/devices/$decoder/region* Hide the vestigial 'region' attribute for root decoders. Reviewed-by: Vishal Verma <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Link: https://lore.kernel.org/r/165853776328.2430596.4647259305040072751.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <[email protected]>
1 parent a53c28b commit 2bde6db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/cxl/core/port.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ static struct attribute *cxl_decoder_base_attrs[] = {
290290
&dev_attr_locked.attr,
291291
&dev_attr_interleave_granularity.attr,
292292
&dev_attr_interleave_ways.attr,
293-
SET_CXL_REGION_ATTR(region)
294293
NULL,
295294
};
296295

@@ -345,6 +344,7 @@ static const struct attribute_group *cxl_decoder_root_attribute_groups[] = {
345344
static struct attribute *cxl_decoder_switch_attrs[] = {
346345
&dev_attr_target_type.attr,
347346
&dev_attr_target_list.attr,
347+
SET_CXL_REGION_ATTR(region)
348348
NULL,
349349
};
350350

@@ -364,6 +364,7 @@ static struct attribute *cxl_decoder_endpoint_attrs[] = {
364364
&dev_attr_mode.attr,
365365
&dev_attr_dpa_size.attr,
366366
&dev_attr_dpa_resource.attr,
367+
SET_CXL_REGION_ATTR(region)
367368
NULL,
368369
};
369370

0 commit comments

Comments
 (0)