From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dave.jiang@intel.com>, <dan.j.williams@intel.com>,
<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
<ira.weiny@intel.com>, <jgroves@micron.com>,
<ravis.opensrc@micron.com>, <fan.ni@samsung.com>,
<anisa.su@samsung.com>, <a.manzanares@samsung.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 2/7] cxl/mbox: Handle Activate FW as async bg
Date: Mon, 23 Jun 2025 15:22:37 +0100 [thread overview]
Message-ID: <20250623152237.00000d72@huawei.com> (raw)
In-Reply-To: <20250617193611.564668-3-dave@stgolabs.net>
On Tue, 17 Jun 2025 12:36:06 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> Allow Activate FW to behave as Sanitize by running in an async
> context. These commands cannot be timesliced, and while it was
> the expectation that hardware vendors perform (offline) activating
> FW in a timely fashion, this might not always be the case.
>
> This further reduces the timeout scenarios when handling the
> bg command synchronously.
>
> Decouple the async background handling from security.
>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Trivial comment inline.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index 5c7fd4a6704c..6fe42871fbf4 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -361,17 +361,11 @@ struct cxl_fw_state {
> *
> * @state: state of last security operation
> * @enabled_cmds: All security commands enabled in the CEL
> - * @poll_tmo_secs: polling timeout
> - * @sanitize_active: sanitize completion pending
> - * @poll_dwork: polling work item
> * @sanitize_node: sanitation sysfs file to notify
> */
> struct cxl_security_state {
> unsigned long state;
> DECLARE_BITMAP(enabled_cmds, CXL_SEC_ENABLED_MAX);
> - int poll_tmo_secs;
> - bool sanitize_active;
> - struct delayed_work poll_dwork;
> struct kernfs_node *sanitize_node;
> };
>
> @@ -379,12 +373,17 @@ struct cxl_security_state {
> * struct cxl_background_state - Driver background operation state info
> *
> * @enabled_cmds: All background commands enabled in the CEL
> + * @poll_dwork: polling background work item
> + * @poll_tmo_secs: polling timeout
> + * @opcode: async running background command
> */
> struct cxl_background_state {
> DECLARE_BITMAP(enabled_cmds, CXL_BG_ENABLED_MAX);
> + struct delayed_work poll_dwork;
> + int poll_tmo_secs;
> + int opcode;
> };
>
> -
Stray change?
> /*
> * enum cxl_devtype - delineate type-2 from a generic type-3 device
> * @CXL_DEVTYPE_DEVMEM - Vendor specific CXL Type-2 device implementing HDM-D or
next prev parent reply other threads:[~2025-06-23 14:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 19:36 [PATCH 0/7] cxl: Activate FW and userspace bgcmds Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 1/7] cxl/mbox: Track background commands from CEL Davidlohr Bueso
2025-06-23 14:16 ` Jonathan Cameron
2025-06-23 16:19 ` Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 2/7] cxl/mbox: Handle Activate FW as async bg Davidlohr Bueso
2025-06-23 14:22 ` Jonathan Cameron [this message]
2025-06-17 19:36 ` [PATCH 3/7] cxl/pci: Lockless background synchronous polling Davidlohr Bueso
2025-06-23 14:29 ` Jonathan Cameron
2025-06-23 16:23 ` Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 4/7] cxl/mbox: Stronger cxl_mbox_background_complete() semantics Davidlohr Bueso
2025-06-23 14:31 ` Jonathan Cameron
2025-06-17 19:36 ` [PATCH 5/7] cxl/mbox: Allow userspace background commands Davidlohr Bueso
2025-06-23 14:49 ` Jonathan Cameron
2025-06-17 19:36 ` [PATCH 6/7] cxl/mbox: Shout upon async bgcmd race Davidlohr Bueso
2025-06-23 14:50 ` Jonathan Cameron
2025-06-23 16:14 ` Davidlohr Bueso
2025-06-17 21:52 ` [PATCH 0/7] cxl: Activate FW and userspace bgcmds Davidlohr Bueso
2025-06-17 22:15 ` [PATCH 7/7] cxl/mbox: Add Populate Log support Davidlohr Bueso
2025-06-23 14:51 ` Jonathan Cameron
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=20250623152237.00000d72@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=anisa.su@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=jgroves@micron.com \
--cc=linux-cxl@vger.kernel.org \
--cc=ravis.opensrc@micron.com \
--cc=vishal.l.verma@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.