mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shi Hao <i.shihao.999@gmail.com>
To: koby.elbaz@intel.com
Cc: konstantin.sinyuk@intel.com, ogabbay@kernel.org,
	gregkh@linuxfoundation.org, linux@weissschuh.net,
	akpm@linux-foundation.org, tomer.tayar@intel.com,
	easwar.hariharan@linux.microsoft.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	i.shihao.999@gmail.com
Subject: [PATCH] accel: habanalabs: use alloc_ordered_workqueue()
Date: Sun,  2 Nov 2025 17:55:11 +0530	[thread overview]
Message-ID: <20251102122511.21141-1-i.shihao.999@gmail.com> (raw)

Replace the deprecated create_singlethread_workqueue() functions with
alloc_ordered_workqueue() since it aligns with current workqueue API
modernization efforts. The conversion is safe since destroy_workqueue()
is used for cleanup in both cases.

No functional changes intended.

Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
---
 drivers/accel/habanalabs/common/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 999c92d7036e..d100a59c31fb 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -903,7 +903,7 @@ static int device_early_init(struct hl_device *hdev)

 	for (i = 0 ; i < hdev->asic_prop.completion_queues_count ; i++) {
 		snprintf(workq_name, 32, "hl%u-free-jobs-%u", hdev->cdev_idx, (u32) i);
-		hdev->cq_wq[i] = create_singlethread_workqueue(workq_name);
+		hdev->cq_wq[i] = alloc_ordered_workqueue(workq_name, 0);
 		if (hdev->cq_wq[i] == NULL) {
 			dev_err(hdev->dev, "Failed to allocate CQ workqueue\n");
 			rc = -ENOMEM;
@@ -912,7 +912,7 @@ static int device_early_init(struct hl_device *hdev)
 	}

 	snprintf(workq_name, 32, "hl%u-events", hdev->cdev_idx);
-	hdev->eq_wq = create_singlethread_workqueue(workq_name);
+	hdev->eq_wq = alloc_ordered_workqueue(workq_name, 0);
 	if (hdev->eq_wq == NULL) {
 		dev_err(hdev->dev, "Failed to allocate EQ workqueue\n");
 		rc = -ENOMEM;
@@ -958,7 +958,7 @@ static int device_early_init(struct hl_device *hdev)
 	hl_mem_mgr_init(hdev->dev, &hdev->kernel_mem_mgr);

 	snprintf(workq_name, 32, "hl%u_device_reset", hdev->cdev_idx);
-	hdev->reset_wq = create_singlethread_workqueue(workq_name);
+	hdev->reset_wq = alloc_ordered_workqueue(workq_name, 0);
 	if (!hdev->reset_wq) {
 		rc = -ENOMEM;
 		dev_err(hdev->dev, "Failed to create device reset WQ\n");
--
2.51.0


             reply	other threads:[~2025-11-02 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-02 12:25 Shi Hao [this message]
2025-11-29 20:36 ` Sinyuk, Konstantin

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=20251102122511.21141-1-i.shihao.999@gmail.com \
    --to=i.shihao.999@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=easwar.hariharan@linux.microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=koby.elbaz@intel.com \
    --cc=konstantin.sinyuk@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=ogabbay@kernel.org \
    --cc=tomer.tayar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®