public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Kane Chen <kane.chen@intel.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH 1/1] platform/x86/intel/pmc: Show live substate requirements
Date: Mon, 12 Aug 2024 15:49:30 +0200	[thread overview]
Message-ID: <7225c299-6086-499a-8dfd-cbc5a8fcc7b6@redhat.com> (raw)
In-Reply-To: <20240719122807.3853292-1-kane.chen@intel.com>

Hi,

On 7/19/24 2:28 PM, Kane Chen wrote:
> While debugging runtime s0ix, we do need to check which required IPs
> are not power gated. This patch adds code to show live substate status
> vs requirements in sys/kernel/debug/pmc_core/substate_requirements to
> help runtime s0ix debug.
> 
> Signed-off-by: Kane Chen <kane.chen@intel.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans



> ---
>  drivers/platform/x86/intel/pmc/core.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index 2ad2f8753e5d4..b93ecc5169745 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -791,13 +791,15 @@ static void pmc_core_substate_req_header_show(struct seq_file *s, int pmc_index)
>  	pmc_for_each_mode(i, mode, pmcdev)
>  		seq_printf(s, " %9s |", pmc_lpm_modes[mode]);
>  
> -	seq_printf(s, " %9s |\n", "Status");
> +	seq_printf(s, " %9s |", "Status");
> +	seq_printf(s, " %11s |\n", "Live Status");
>  }
>  
>  static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>  {
>  	struct pmc_dev *pmcdev = s->private;
>  	u32 sts_offset;
> +	u32 sts_offset_live;
>  	u32 *lpm_req_regs;
>  	int num_maps, mp, pmc_index;
>  
> @@ -811,6 +813,7 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>  		maps = pmc->map->lpm_sts;
>  		num_maps = pmc->map->lpm_num_maps;
>  		sts_offset = pmc->map->lpm_status_offset;
> +		sts_offset_live = pmc->map->lpm_live_status_offset;
>  		lpm_req_regs = pmc->lpm_req_regs;
>  
>  		/*
> @@ -828,6 +831,7 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>  		for (mp = 0; mp < num_maps; mp++) {
>  			u32 req_mask = 0;
>  			u32 lpm_status;
> +			u32 lpm_status_live;
>  			const struct pmc_bit_map *map;
>  			int mode, idx, i, len = 32;
>  
> @@ -842,6 +846,9 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>  			/* Get the last latched status for this map */
>  			lpm_status = pmc_core_reg_read(pmc, sts_offset + (mp * 4));
>  
> +			/* Get the runtime status for this map */
> +			lpm_status_live = pmc_core_reg_read(pmc, sts_offset_live + (mp * 4));
> +
>  			/*  Loop over elements in this map */
>  			map = maps[mp];
>  			for (i = 0; map[i].name && i < len; i++) {
> @@ -868,6 +875,9 @@ static int pmc_core_substate_req_regs_show(struct seq_file *s, void *unused)
>  				/* In Status column, show the last captured state of this agent */
>  				seq_printf(s, " %9s |", lpm_status & bit_mask ? "Yes" : " ");
>  
> +				/* In Live status column, show the live state of this agent */
> +				seq_printf(s, " %11s |", lpm_status_live & bit_mask ? "Yes" : " ");
> +
>  				seq_puts(s, "\n");
>  			}
>  		}


      parent reply	other threads:[~2024-08-12 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 12:28 [PATCH 1/1] platform/x86/intel/pmc: Show live substate requirements Kane Chen
2024-07-29 11:38 ` Ilpo Järvinen
2024-08-12 13:49 ` Hans de Goede [this message]

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=7225c299-6086-499a-8dfd-cbc5a8fcc7b6@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kane.chen@intel.com \
    --cc=linux-kernel@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