X86 platform drivers
 help / color / mirror / Atom feed
From: Suma Hegde <Suma.Hegde@amd.com>
To: <hdegoede@redhat.com>
Cc: <platform-driver-x86@vger.kernel.org>,
	Suma Hegde <suma.hegde@amd.com>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>
Subject: [PATCH v2 3/4] platform/x86/amd/hsmp: improve the error log
Date: Wed, 6 Sep 2023 07:13:01 +0000	[thread overview]
Message-ID: <20230906071302.291260-3-Suma.Hegde@amd.com> (raw)
In-Reply-To: <20230906071302.291260-1-Suma.Hegde@amd.com>

From: Suma Hegde <suma.hegde@amd.com>

1. Change print message during platform init to a more meaningful
   clear message.
2. Return the error code returned by hsmp_test() itself, rather then
   returning a common EOPNOTSUPP error.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
---
Changes since v1:
1. New patch.

 drivers/platform/x86/amd/hsmp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/amd/hsmp.c b/drivers/platform/x86/amd/hsmp.c
index 80c71c6ddeaf..a9c5a36daac1 100644
--- a/drivers/platform/x86/amd/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp.c
@@ -569,10 +569,10 @@ static int __init hsmp_plt_init(void)
 	for (i = 0; i < num_sockets; i++) {
 		ret = hsmp_test(i, 0xDEADBEEF);
 		if (ret) {
-			pr_err("HSMP is not supported on Fam:%x model:%x\n",
+			pr_err("HSMP test message failed on Fam:%x model:%x\n",
 			       boot_cpu_data.x86, boot_cpu_data.x86_model);
-			pr_err("Or Is HSMP disabled in BIOS ?\n");
-			return -EOPNOTSUPP;
+			pr_err("Is HSMP disabled in BIOS ?\n");
+			return ret;
 		}
 	}
 
-- 
2.25.1


  parent reply	other threads:[~2023-09-06  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  7:12 [PATCH v2 1/4] platform/x86/amd/hsmp: create plat specific struct Suma Hegde
2023-09-06  7:13 ` [PATCH v2 2/4] platform/x86/amd/hsmp: add support for metrics tbl Suma Hegde
2023-09-06  7:13 ` Suma Hegde [this message]
2023-09-06  7:13 ` [PATCH v2 4/4] Documentation: Add amd_hsmp sysfs file info Suma Hegde
2023-09-13 15:28   ` Hans de Goede
2023-09-13 15:27 ` [PATCH v2 1/4] platform/x86/amd/hsmp: create plat specific struct Hans de Goede
2023-09-15 11:49   ` Hegde, Suma
2023-09-13 15:28 ` Hans de Goede

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=20230906071302.291260-3-Suma.Hegde@amd.com \
    --to=suma.hegde@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=nchatrad@amd.com \
    --cc=platform-driver-x86@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