[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <67eb26a711ad8_11987294ed@dwillia2-xfh.jf.intel.com.notmuch>
Date: Mon, 31 Mar 2025 16:35:03 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Shiju Jose <shiju.jose@...wei.com>, Dan Williams
<dan.j.williams@...el.com>, "linux-cxl@...r.kernel.org"
<linux-cxl@...r.kernel.org>, "dave@...olabs.net" <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>, "dave.jiang@...el.com"
<dave.jiang@...el.com>, "alison.schofield@...el.com"
<alison.schofield@...el.com>, "vishal.l.verma@...el.com"
<vishal.l.verma@...el.com>, "ira.weiny@...el.com" <ira.weiny@...el.com>,
"david@...hat.com" <david@...hat.com>, "Vilas.Sridharan@....com"
<Vilas.Sridharan@....com>
CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>,
"tony.luck@...el.com" <tony.luck@...el.com>, "rafael@...nel.org"
<rafael@...nel.org>, "lenb@...nel.org" <lenb@...nel.org>,
"mchehab@...nel.org" <mchehab@...nel.org>, "leo.duran@....com"
<leo.duran@....com>, "Yazen.Ghannam@....com" <Yazen.Ghannam@....com>,
"rientjes@...gle.com" <rientjes@...gle.com>, "jiaqiyan@...gle.com"
<jiaqiyan@...gle.com>, "Jon.Grimm@....com" <Jon.Grimm@....com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"naoya.horiguchi@....com" <naoya.horiguchi@....com>, "james.morse@....com"
<james.morse@....com>, "jthoughton@...gle.com" <jthoughton@...gle.com>,
"somasundaram.a@....com" <somasundaram.a@....com>, "erdemaktas@...gle.com"
<erdemaktas@...gle.com>, "pgonda@...gle.com" <pgonda@...gle.com>,
"duenwen@...gle.com" <duenwen@...gle.com>, "gthelen@...gle.com"
<gthelen@...gle.com>, "wschwartz@...erecomputing.com"
<wschwartz@...erecomputing.com>, "dferguson@...erecomputing.com"
<dferguson@...erecomputing.com>, "wbs@...amperecomputing.com"
<wbs@...amperecomputing.com>, "nifan.cxl@...il.com" <nifan.cxl@...il.com>,
tanxiaofei <tanxiaofei@...wei.com>, "Zengtao (B)" <prime.zeng@...ilicon.com>,
Roberto Sassu <roberto.sassu@...wei.com>, "kangkang.shen@...urewei.com"
<kangkang.shen@...urewei.com>, wanghuiqiang <wanghuiqiang@...wei.com>,
Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH v2 1/8] cxl: Add helper function to retrieve a feature
entry
Shiju Jose wrote:
> >-----Original Message-----
> >From: Dan Williams <dan.j.williams@...el.com>
> >Sent: 26 March 2025 21:33
> >To: Shiju Jose <shiju.jose@...wei.com>; linux-cxl@...r.kernel.org;
> >dan.j.williams@...el.com; dave@...olabs.net; Jonathan Cameron
> ><jonathan.cameron@...wei.com>; dave.jiang@...el.com;
> >alison.schofield@...el.com; vishal.l.verma@...el.com; ira.weiny@...el.com;
> >david@...hat.com; Vilas.Sridharan@....com
> >Cc: linux-edac@...r.kernel.org; linux-acpi@...r.kernel.org; linux-
> >mm@...ck.org; linux-kernel@...r.kernel.org; bp@...en8.de;
> >tony.luck@...el.com; rafael@...nel.org; lenb@...nel.org;
> >mchehab@...nel.org; leo.duran@....com; Yazen.Ghannam@....com;
> >rientjes@...gle.com; jiaqiyan@...gle.com; Jon.Grimm@....com;
> >dave.hansen@...ux.intel.com; naoya.horiguchi@....com;
> >james.morse@....com; jthoughton@...gle.com; somasundaram.a@....com;
> >erdemaktas@...gle.com; pgonda@...gle.com; duenwen@...gle.com;
> >gthelen@...gle.com; wschwartz@...erecomputing.com;
> >dferguson@...erecomputing.com; wbs@...amperecomputing.com;
> >nifan.cxl@...il.com; tanxiaofei <tanxiaofei@...wei.com>; Zengtao (B)
> ><prime.zeng@...ilicon.com>; Roberto Sassu <roberto.sassu@...wei.com>;
> >kangkang.shen@...urewei.com; wanghuiqiang <wanghuiqiang@...wei.com>;
> >Linuxarm <linuxarm@...wei.com>; Shiju Jose <shiju.jose@...wei.com>
> >Subject: Re: [PATCH v2 1/8] cxl: Add helper function to retrieve a feature entry
> >
> >shiju.jose@ wrote:
> >> From: Shiju Jose <shiju.jose@...wei.com>
> >>
> >> Add helper function to retrieve a feature entry from the supported
> >> features list, if supported.
> >>
> >> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> >> Reviewed-by: Fan Ni <fan.ni@...sung.com>
> >> Signed-off-by: Shiju Jose <shiju.jose@...wei.com>
> >> ---
> >> drivers/cxl/core/core.h | 2 ++
> >> drivers/cxl/core/features.c | 23 +++++++++++++++++++++++
> >> 2 files changed, 25 insertions(+)
> >>
> >> diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h index
> >> 1803aedb25ca..16bc717376fc 100644
> >> --- a/drivers/cxl/core/core.h
> >> +++ b/drivers/cxl/core/core.h
> >> @@ -123,6 +123,8 @@ int cxl_ras_init(void); void cxl_ras_exit(void);
> >>
> >> #ifdef CONFIG_CXL_FEATURES
> >> +struct cxl_feat_entry *cxl_get_feature_entry(struct cxl_dev_state *cxlds,
> >> + const uuid_t *feat_uuid);
> >
> >It is unfortunate that this naming choice is too similar to cxl_get_feature().
> >However, as I go to suggest a new name I find that this is a duplicate of
> >get_support_feature_info() in Dave's fwctl series. Just drop this patch in favor of
> >that.
>
> Hi Dan,
>
> I am fine to use get_support_feature_info() for the EDAC features.
> However this function is defined as static in the fwctl series and
So, remove static and make it a routine shared between core/features.c
and core/edac.c.
> takes struct fwctl_rpc_cxl * as input for RPC instead of uuid_t *
> as in cxl_get_feature_entry().
>
> static struct cxl_feat_entry *
> get_support_feature_info(struct cxl_features_state *cxlfs,
> const struct fwctl_rpc_cxl *rpc_in)
>
> Can you suggest how to use get_support_feature_info() from within the CXL driver
> to retrieve a supported feature entry (for e.g an EDAC feature)?
Simply refactor it into something generic that the cxl-edac and
cxl-fwctl path can share:
struct cxl_feat_entry *
cxl_feature_info(struct cxl_features_state *cxlfs, const uuid_t *uuid)
...with the header in drivers/cxl/core/core.h where other cross-core
object helpers are defined.
Powered by blists - more mailing lists