All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xi Pardee <xi.pardee@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	david.e.box@intel.com
Cc: platform-driver-x86@vger.kernel.org, irenic.rajneesh@gmail.com,
	kernel-dev@igalia.com, kernel@gpiccoli.net
Subject: Re: [PATCH 2/4] platform/x86/intel/pmc: Dump raw SLP_Sx_DBG registers and distinguish between them
Date: Mon, 13 Oct 2025 10:39:37 -0700	[thread overview]
Message-ID: <232ab4da-42ea-4d17-96c8-ca0d93f04f33@linux.intel.com> (raw)
In-Reply-To: <ad1d5457-cae6-03f6-970d-0492727e66a0@linux.intel.com>

Hi,

Sorry for the late response. My response is inline.

Xi

On 9/24/2025 2:57 AM, Ilpo Järvinen wrote:
> On Tue, 23 Sep 2025, Guilherme G. Piccoli wrote:
>
>> Hi Ilpo, thanks a lot for your review, very nice points! Comments below:
>>
>>
>> On 23/09/2025 04:59, Ilpo Järvinen wrote:
>>> [...]
>>>> This should bring no functional change, the goal is only to improve
>>>> reading and allow full comparison between raw register values.
>>> Hi,
>>>
>>> I don't think that's exactly the definition of "no function change" if you
>>> intentionally make a change to the reading. :-)
>> Hehe yeah, you're right - it changes the output, so that's a functional
>> change indeed (imagine a userspace script parsing it...). I was thinking
>> in functional change as in "no extra register reads are performed", but
>> I agree with you and will drop this text from next version, thanks for
>> pointing!
>>
>>
>>> [...]
>>>> +
>>>> +		if (dev)
>>>> +			dev_info(dev, "\nSLP_S%u_DBG:\t0x%x\n", cnt, data);
>>>> +		if (s)
>>>> +			seq_printf(s, "\nSLP_S%u_DBG:\t0x%x\n", cnt, data);
>>>>   		while (map->name) {
>>>>   			if (dev)
>>>> -				dev_info(dev, "SLP_S0_DBG: %-32s\tState: %s\n",
>>>> -					map->name,
>>>> +				dev_info(dev, "SLP_S%u_DBG: %-32s\tState: %s\n",
>>> I'm not sure about this change. To me it looks the naming is "SLP S0 DEBUG
>>> REGx (SLP_S0_DBG_x)" according to this:
>>>
>>> https://edc.intel.com/content/www/tw/zh/design/publications/14th-generation-core-processors-ioe-p-registers/slp-s0-debug-reg2-slp-s0-dbg-2-offset-10bc/
>>>
>>> ...So changing from S0 to S1 or S2 does not seem correct here?
>>>
>>> I wonder if this really a problem to begin with as the names should be
>>> unique, no?
>> Totally right again! Nice catch, it should be as you pointed, the
>> different ID is at the end of the string.
>> And no, it's definitely not a problem / big deal - I just took the
>> opportunity to improve the output, but I messed up heh
>>
>> Lemme know if you prefer that I keep the old naming or fix it properly,
>> like SLP_S0_DBG_2, etc.
> I'd prefer Xi or David comment on this whether to add the number there or
> not. This will end up being after the merge window material anyway so lets
> give them a few days.

I am still uncertain about the added value of this patch. Could you 
please elaborate on how displaying the register name would assist with 
debugging?

The registers in slps0_dbg_maps are intended for diagnosing slps0 
related issues, and the register names should follow the format 
SLP_S0_DBG_(1,2,3).

Additionally, the full 32-bit register data should not be displayed 
here, as some of the bits are reserved and must not be exposed to users.

>>> [...]
>>> This assumption seems somewhat fragile but maybe it's not worth
>>> engineering it beyond this at this point.
>> Sorry, I couldn't understand this sentence. Can you clarify it for me?
>> What assumption and what do you think we should do?
> I was just referring to the ++ line that you for some reason snipped.
> It assumed certain order of things in the input array which arms a
> trap. But then, we know all the current inputs are okay with this simple
> approach and I'm not sure if this code is getting much changes in the
> future so it might be over-engineering to store the number into the
> input array within the struct.
>
>>> [...]
>>> Also, please remember to add all maintainers as receipients when posting.
>> My apologies - I checked MAINTAINERS directly and added everyone from
>> INTEL PMC + Xi Pardee (many patches in the driver); but I should have
>> used get_maintainers instead, which brings your name. Thanks for
>> reviewing even when I forgot to add your email!!

  parent reply	other threads:[~2025-10-13 17:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 22:52 [PATCH 0/4] Some TGL and overall S0ix debug improvements Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 1/4] platform/x86/intel/pmc: Fix typo on CNP register name (and clarify comment) Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 2/4] platform/x86/intel/pmc: Dump raw SLP_Sx_DBG registers and distinguish between them Guilherme G. Piccoli
2025-09-23  7:59   ` Ilpo Järvinen
2025-09-24  1:05     ` Guilherme G. Piccoli
2025-09-24  9:57       ` Ilpo Järvinen
2025-09-25 17:17         ` Guilherme G. Piccoli
2025-10-13 17:39         ` Xi Pardee [this message]
2025-10-13 18:05           ` Guilherme G. Piccoli
2025-10-23 21:44             ` Xi Pardee
2025-10-24 10:55               ` Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 3/4] platform/x86/intel/pmc: Always dump LPM status regs on unsuccessful paths Guilherme G. Piccoli
2025-10-14 19:29   ` Xi Pardee
2025-10-14 19:58     ` Guilherme G. Piccoli
2025-10-14 23:55       ` Xi Pardee
2025-10-15 17:35         ` Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 4/4][RFC] platform/x86/intel/pmc: Re-add SLP_S0_DBG register dump on Tiger Lake Guilherme G. Piccoli
2025-10-14 19:24   ` Xi Pardee
2025-10-14 20:21     ` Guilherme G. Piccoli
2025-10-13 15:14 ` [PATCH 0/4] Some TGL and overall S0ix debug improvements Guilherme G. Piccoli

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=232ab4da-42ea-4d17-96c8-ca0d93f04f33@linux.intel.com \
    --to=xi.pardee@linux.intel.com \
    --cc=david.e.box@intel.com \
    --cc=gpiccoli@igalia.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=kernel-dev@igalia.com \
    --cc=kernel@gpiccoli.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.