linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gayatri Kammela <gayatri.kammela@intel.com>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, vishwanath.somayaji@intel.com,
	dvhart@infradead.org, mika.westerberg@intel.com,
	peterz@infradead.org, charles.d.prestopine@intel.com,
	Gayatri Kammela <gayatri.kammela@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	David Box <david.e.box@intel.com>
Subject: [PATCH v1 6/7] platform/x86: intel_pmc_core: Dump low power status registers on an S0ix.y failure
Date: Fri, 24 Jan 2020 10:50:27 -0800	[thread overview]
Message-ID: <e870280c057531ab26a119b444ca19d998d847a3.1579890793.git.gayatri.kammela@intel.com> (raw)
In-Reply-To: <cover.1579890793.git.gayatri.kammela@intel.com>
In-Reply-To: <cover.1579890793.git.gayatri.kammela@intel.com>

Platforms prior to Tiger Lake has no sub-states of S0ix and accessing
device PM states that are latched whenever there is a PC10 entry is
possible with the help of slp_s0_debug_status and slp_s0_dbg_latch
debugfs entries.

If a platform has sub-states of S0ix, no such entries are created.
Hence, dump low power status registers on resume When any attempt to
enter any low power state was unsuccessful.

Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David Box <david.e.box@intel.com>
Suggested-by: David Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 0018fdd0194b..92c9840b5029 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -1283,6 +1283,8 @@ static inline bool pmc_core_is_s0ix_failed(struct pmc_dev *pmcdev)
 static int pmc_core_resume(struct device *dev)
 {
 	struct pmc_dev *pmcdev = dev_get_drvdata(dev);
+	const struct pmc_bit_map **maps = pmcdev->map->lpm_sts;
+	int offset = pmcdev->map->lpm_status_offset;
 
 	if (!pmcdev->check_counters)
 		return 0;
@@ -1302,6 +1304,8 @@ static int pmc_core_resume(struct device *dev)
 		 pmcdev->s0ix_counter);
 	if (pmcdev->map->slps0_dbg_maps)
 		pmc_core_slps0_display(pmcdev, dev, NULL);
+	if (pmcdev->map->lpm_sts)
+		pmc_core_lpm_display(pmcdev, dev, NULL, "STATUS", offset, maps);
 
 	return 0;
 }
-- 
2.17.1


  parent reply	other threads:[~2020-01-24 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 18:50 [PATCH v1 0/7] platform/x86: intel_pmc_core: Add debugfs entries Gayatri Kammela
2020-01-24 18:50 ` [PATCH v1 1/7] platform/x86: intel_pmc_core: Add debugfs entry to access sub-state residencies Gayatri Kammela
2020-01-24 18:50 ` [PATCH v1 2/7] platform/x86: intel_pmc_core: Add debugfs entry for low power mode status registers Gayatri Kammela
2020-01-24 18:50 ` [PATCH v1 3/7] platform/x86: intel_pmc_core: Refactor the driver by removing redundant code Gayatri Kammela
2020-01-24 18:50 ` [PATCH v1 4/7] platform/x86: intel_pmc_core: Remove slp_s0 attributes from tgl_reg_map Gayatri Kammela
2020-01-24 18:50 ` [PATCH v1 5/7] platform/x86: intel_pmc_core: Add an additional parameter to pmc_core_lpm_display() Gayatri Kammela
2020-01-24 18:50 ` Gayatri Kammela [this message]
2020-01-24 18:50 ` [PATCH v1 7/7] platform/x86: intel_pmc_core: Add debugfs support to access live status registers Gayatri Kammela
2020-01-27 10:49 ` [PATCH v1 0/7] platform/x86: intel_pmc_core: Add debugfs entries Andy Shevchenko
2020-01-27 18:02   ` Kammela, Gayatri
2020-01-27 18:59     ` Andy Shevchenko
2020-02-04  4:00       ` Kammela, Gayatri
2020-02-04 11:34         ` Andy Shevchenko
2020-02-04 23:10           ` Kammela, Gayatri
2020-02-05  9:08             ` Andy Shevchenko

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=e870280c057531ab26a119b444ca19d998d847a3.1579890793.git.gayatri.kammela@intel.com \
    --to=gayatri.kammela@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=charles.d.prestopine@intel.com \
    --cc=david.e.box@intel.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@intel.com \
    --cc=peterz@infradead.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    --cc=vishwanath.somayaji@intel.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;
as well as URLs for NNTP newsgroup(s).