From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 4/6] habanalabs: refactor reset log message
Date: Mon, 4 Oct 2021 13:08:28 +0300 [thread overview]
Message-ID: <20211004100830.27573-4-ogabbay@kernel.org> (raw)
In-Reply-To: <20211004100830.27573-1-ogabbay@kernel.org>
Reset to the device is not necessarily due to an error, so print it
as info instead of error.
In addition, print the type of reset we are doing:
- reset of the entire device (aka hard reset)
- reset of the device after user have released it (less than hard reset)
- lighter reset of an inference device (aka soft reset)
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
drivers/misc/habanalabs/common/device.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index 8f96f2bb14ec..be18ad0c1bfc 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -1018,7 +1018,14 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
take_release_locks(hdev);
- dev_err(hdev->dev, "Going to RESET device!\n");
+ if (hard_reset)
+ dev_info(hdev->dev, "Going to reset device\n");
+ else if (flags & HL_RESET_DEVICE_RELEASE)
+ dev_info(hdev->dev,
+ "Going to reset device after it was released by user\n");
+ else
+ dev_info(hdev->dev,
+ "Going to reset compute engines of inference device\n");
}
again:
--
2.17.1
next prev parent reply other threads:[~2021-10-04 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 10:08 [PATCH 1/6] habanalabs: add support for a long interrupt target value Oded Gabbay
2021-10-04 10:08 ` [PATCH 2/6] habanalabs: fix debugfs device memory MMU VA translation Oded Gabbay
2021-10-04 10:08 ` [PATCH 3/6] habanalabs: define soft-reset as inference op Oded Gabbay
2021-10-04 10:08 ` Oded Gabbay [this message]
2021-10-04 10:08 ` [PATCH 5/6] habanalabs: prevent race between fd close/open Oded Gabbay
2021-10-04 10:08 ` [PATCH 6/6] habanalabs: take timestamp on wait for interrupt Oded Gabbay
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=20211004100830.27573-4-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--cc=linux-kernel@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