From: Dave Jiang <dave.jiang@intel.com>
To: Dan Williams <dan.j.williams@intel.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v3 09/10] tools/testing/cxl: Make cxl_memdev_state available to other command emulation
Date: Fri, 13 Oct 2023 10:21:41 -0700 [thread overview]
Message-ID: <502a79b5-e172-4bcb-a73f-b9d94dcb2d3d@intel.com> (raw)
In-Reply-To: <169657721157.1491153.10282227094664408585.stgit@dwillia2-xfh.jf.intel.com>
On 10/6/23 00:26, Dan Williams wrote:
> Move @mds out of the event specific 'struct mock_event_store' and into
> the base 'struct cxl_mockmem_data' directly. This is in preparation for
> enabling cxl_test to exercise the notifier flow for 'sanitize' operation
> completion.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> tools/testing/cxl/test/mem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index 68118c37f0b5..ab311b59899a 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -133,7 +133,6 @@ struct mock_event_log {
> };
>
> struct mock_event_store {
> - struct cxl_memdev_state *mds;
> struct mock_event_log mock_logs[CXL_EVENT_TYPE_MAX];
> u32 ev_status;
> };
> @@ -150,6 +149,7 @@ struct cxl_mockmem_data {
> int user_limit;
> int master_limit;
> struct mock_event_store mes;
> + struct cxl_memdev_state *mds;
> u8 event_buf[SZ_4K];
> u64 timestamp;
> };
> @@ -326,7 +326,7 @@ static void cxl_mock_event_trigger(struct device *dev)
> event_reset_log(log);
> }
>
> - cxl_mem_get_event_records(mes->mds, mes->ev_status);
> + cxl_mem_get_event_records(mdata->mds, mes->ev_status);
> }
>
> struct cxl_event_record_raw maint_needed = {
> @@ -1415,6 +1415,7 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
> if (IS_ERR(mds))
> return PTR_ERR(mds);
>
> + mdata->mds = mds;
> mds->mbox_send = cxl_mock_mbox_send;
> mds->payload_size = SZ_4K;
> mds->event.buf = (struct cxl_get_event_payload *) mdata->event_buf;
> @@ -1447,7 +1448,6 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
> if (rc)
> return rc;
>
> - mdata->mes.mds = mds;
> cxl_mock_add_event_logs(&mdata->mes);
>
> cxlmd = devm_cxl_add_memdev(&pdev->dev, cxlds);
>
>
next prev parent reply other threads:[~2023-10-13 17:21 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 7:25 [PATCH v3 00/10] cxl/mem: Fix shutdown order Dan Williams
2023-10-06 7:26 ` [PATCH v3 01/10] cxl/pci: Remove unnecessary device reference management in sanitize work Dan Williams
2023-10-06 7:26 ` [PATCH v3 02/10] cxl/pci: Cleanup 'sanitize' to always poll Dan Williams
2023-10-09 17:19 ` Davidlohr Bueso
2023-10-09 18:39 ` Dan Williams
2023-10-09 20:48 ` Davidlohr Bueso
2023-10-06 7:26 ` [PATCH v3 03/10] cxl/pci: Remove hardirq handler for cxl_request_irq() Dan Williams
2023-10-06 22:06 ` Davidlohr Bueso
2023-10-09 3:29 ` Ira Weiny
2023-10-09 16:36 ` Jonathan Cameron
2023-10-13 16:59 ` Dave Jiang
2023-10-06 7:26 ` [PATCH v3 04/10] cxl/pci: Remove inconsistent usage of dev_err_probe() Dan Williams
2023-10-06 22:10 ` Davidlohr Bueso
2023-10-09 3:42 ` Ira Weiny
2023-10-09 16:38 ` Jonathan Cameron
2023-10-13 17:09 ` Dave Jiang
2023-10-06 7:26 ` [PATCH v3 05/10] cxl/pci: Clarify devm host for memdev relative setup Dan Williams
2023-10-09 3:50 ` Ira Weiny
2023-10-09 16:41 ` Jonathan Cameron
2023-10-13 17:12 ` Dave Jiang
2023-10-06 7:26 ` [PATCH v3 06/10] cxl/pci: Fix sanitize notifier setup Dan Williams
2023-10-09 16:42 ` Jonathan Cameron
2023-10-09 18:08 ` Davidlohr Bueso
2023-10-06 7:26 ` [PATCH v3 07/10] cxl/memdev: Fix sanitize vs decoder setup locking Dan Williams
2023-10-06 10:10 ` kernel test robot
2023-10-09 4:17 ` Ira Weiny
2023-10-09 18:18 ` Dan Williams
2023-10-09 22:32 ` Dan Williams
2023-10-09 16:46 ` Jonathan Cameron
2023-10-09 18:36 ` Dan Williams
2023-10-11 20:44 ` Jonathan Cameron
2023-10-10 20:21 ` Davidlohr Bueso
2023-10-13 17:20 ` Dave Jiang
2023-10-06 7:26 ` [PATCH v3 08/10] cxl/mem: Fix shutdown order Dan Williams
2023-10-06 7:26 ` [PATCH v3 09/10] tools/testing/cxl: Make cxl_memdev_state available to other command emulation Dan Williams
2023-10-09 3:24 ` Ira Weiny
2023-10-13 17:21 ` Dave Jiang [this message]
2023-10-06 7:26 ` [PATCH v3 10/10] tools/testing/cxl: Add 'sanitize notifier' support Dan Williams
2023-10-09 4:25 ` Ira Weiny
2023-10-13 17:25 ` Dave Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=502a79b5-e172-4bcb-a73f-b9d94dcb2d3d@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox