From: Xi Pardee <xi.pardee@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: irenic.rajneesh@gmail.com, david.e.box@linux.intel.com,
Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 3/5] platform/x86:intel/pmc: Improve function to show substate header
Date: Mon, 30 Jun 2025 10:35:10 -0700 [thread overview]
Message-ID: <67da5800-e8b3-4f80-a0e6-c9becae60c07@linux.intel.com> (raw)
In-Reply-To: <951682a6-66e7-cd1a-4798-c5b4f88c79ec@linux.intel.com>
Hi Ilpo,
Thanks for reviewing the patch. My response is inline.
On 6/30/2025 4:34 AM, Ilpo Järvinen wrote:
> On Tue, 24 Jun 2025, Xi Pardee wrote:
>
>> Refactor pmc_core_substate_req_header_show() to accept a new argument.
>> This is a preparation patch to introduce a new way to show Low Power
>> Mode substate requirement data for platforms starting from Panther
>> Lake. Increased the size for the name column as the Low Power Mode
>> requirement register name is longer in newer platforms.
>>
>> Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
>> ---
>> drivers/platform/x86/intel/pmc/core.c | 15 +++++++++------
>> 1 file changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
>> index a1dd80bdbd413..47cc5120e7dd6 100644
>> --- a/drivers/platform/x86/intel/pmc/core.c
>> +++ b/drivers/platform/x86/intel/pmc/core.c
>> @@ -828,17 +828,20 @@ static int pmc_core_substate_l_sts_regs_show(struct seq_file *s, void *unused)
>> }
>> DEFINE_SHOW_ATTRIBUTE(pmc_core_substate_l_sts_regs);
>>
>> -static void pmc_core_substate_req_header_show(struct seq_file *s, int pmc_index)
>> +static void pmc_core_substate_req_header_show(struct seq_file *s, int pmc_index, char *name)
>> {
>> struct pmc_dev *pmcdev = s->private;
>> int mode;
>>
>> - seq_printf(s, "%30s |", "Element");
>> + seq_printf(s, "%40s |", "Element");
>> pmc_for_each_mode(mode, pmcdev)
>> seq_printf(s, " %9s |", pmc_lpm_modes[mode]);
>>
>> - seq_printf(s, " %9s |", "Status");
>> - seq_printf(s, " %11s |\n", "Live Status");
>> + if (!strcmp(name, "Status")) {
> I'm not very happy passing this as string. Could we use an
> internal defines/enum instead for this differentiation?
Will use enum in next version.
>
>> + seq_printf(s, " %9s |", name);
>> + seq_printf(s, " %11s |\n", "Live Status");
>> + } else
>> + seq_printf(s, " %9s |\n", name);
> Please always use braces symmetrically in both blocks.
Will use braces in next version.
Thanks!
Xi
>
>> }
>>
>> static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>> @@ -872,7 +875,7 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>> continue;
>>
>> /* Display the header */
>> - pmc_core_substate_req_header_show(s, pmc_index);
>> + pmc_core_substate_req_header_show(s, pmc_index, "Status");
>>
>> /* Loop over maps */
>> for (mp = 0; mp < num_maps; mp++) {
>> @@ -910,7 +913,7 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>> }
>>
>> /* Display the element name in the first column */
>> - seq_printf(s, "pmc%d: %26s |", pmc_index, map[i].name);
>> + seq_printf(s, "pmc%d: %34s |", pmc_index, map[i].name);
>>
>> /* Loop over the enabled states and display if required */
>> pmc_for_each_mode(mode, pmcdev) {
>>
next prev parent reply other threads:[~2025-06-30 17:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 6:31 [PATCH v2 0/5] Enable SSRAM support in PTL and LNL Xi Pardee
2025-06-25 6:31 ` [PATCH v2 1/5] platform/x86:intel/pmc: Enable SSRAM support for Lunar Lake Xi Pardee
2025-06-30 11:25 ` Ilpo Järvinen
2025-06-25 6:31 ` [PATCH v2 2/5] platform/x86:intel/pmc: Move telemetry endpoint register handling Xi Pardee
2025-06-30 11:25 ` Ilpo Järvinen
2025-06-25 6:31 ` [PATCH v2 3/5] platform/x86:intel/pmc: Improve function to show substate header Xi Pardee
2025-06-30 11:34 ` Ilpo Järvinen
2025-06-30 17:35 ` Xi Pardee [this message]
2025-06-25 6:31 ` [PATCH v2 4/5] platform/x86:intel/pmc: Show substate requirement for S0ix blockers Xi Pardee
2025-06-26 16:38 ` Ilpo Järvinen
2025-06-26 21:16 ` Xi Pardee
2025-06-27 8:08 ` Ilpo Järvinen
2025-06-30 18:01 ` Xi Pardee
2025-06-25 6:31 ` [PATCH v2 5/5] platform/x86:intel/pmc: Enable SSRAM support for Panther Lake Xi Pardee
2025-06-30 11:28 ` Ilpo Järvinen
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=67da5800-e8b3-4f80-a0e6-c9becae60c07@linux.intel.com \
--to=xi.pardee@linux.intel.com \
--cc=david.e.box@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--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
all inboxes | Powered by JetHome®