From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Borislav Petkov <bp@alien8.de>,
Yazen Ghannam <yazen.ghannam@amd.com>,
<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<acpica-devel@lists.linux.dev>, Thomas Gleixner <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>
Cc: Vilas Sridharan <Vilas.Sridharan@amd.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Mikhail Paulyshka <me@mixaill.net>,
Kai Huang <kai.huang@intel.com>, Rong Zhang <i@rong.moe>
Subject: Re: [RFC PATCH 3/3] x86/cpu/amd: Fetch S5_RESET_STATUS from PHAT when supported
Date: Fri, 5 Jun 2026 09:40:14 +0530 [thread overview]
Message-ID: <d258b3dd-633d-4733-9eb3-4b65013e81e7@amd.com> (raw)
In-Reply-To: <d45e3051-ced5-45d8-b3ff-c50f4e41cd1f@amd.com>
Hello Mario,
On 6/3/2026 7:56 PM, Mario Limonciello wrote:
>> + record = (void *)acpi_phat_get_vendor_reset_reason(&guid);
>> + if (!IS_ERR(record)) {
>> + bool record_valid = false;
>> +
>> + /* Sanity check before using the parsed record. */
>> + if (record->header.length == sizeof(*record)) {
>
> Why not do this sanity check in acpi_phat_get_vendor_reset_reason()
> directly? Then we can always assume if something is returned it's
> valid and it's simpler here (and any other potential callers in future).
My intention here was to catch any changes to the PHAT record format
for this GUID. If we can reasonably assume that isn't going to happen,
we can skip this check entirely.
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-06-05 4:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 6:33 [RFC PATCH 0/3] ACPI, x86/cpu/amd: Parse S5_REST_STATUS from ACPI PHAT on supported AMD platforms K Prateek Nayak
2026-06-03 6:33 ` [RFC PATCH 1/3] ACPICA: actbl2.h: ACPI 6.5: PHAT: Add more struct definitions K Prateek Nayak
2026-06-03 6:33 ` [RFC PATCH 2/3] ACPI: PHAT: Add generic helper to parse PHAT records K Prateek Nayak
2026-06-03 14:25 ` Mario Limonciello
2026-06-05 4:06 ` K Prateek Nayak
2026-06-03 6:33 ` [RFC PATCH 3/3] x86/cpu/amd: Fetch S5_RESET_STATUS from PHAT when supported K Prateek Nayak
2026-06-03 14:26 ` Mario Limonciello
2026-06-05 4:10 ` K Prateek Nayak [this message]
2026-06-03 14:37 ` [RFC PATCH 0/3] ACPI, x86/cpu/amd: Parse S5_REST_STATUS from ACPI PHAT on supported AMD platforms Rong Zhang
2026-06-05 4:02 ` K Prateek Nayak
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=d258b3dd-633d-4733-9eb3-4b65013e81e7@amd.com \
--to=kprateek.nayak@amd.com \
--cc=Vilas.Sridharan@amd.com \
--cc=acpica-devel@lists.linux.dev \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=i@rong.moe \
--cc=kai.huang@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=me@mixaill.net \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.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®