public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xi Pardee <xi.pardee@linux.intel.com>
To: xi.pardee@linux.intel.com, irenic.rajneesh@gmail.com,
	david.e.box@linux.intel.com, hdegoede@redhat.com,
	ilpo.jarvinen@linux.intel.com,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [PATCH v5 0/5] Create Intel PMC SSRAM Telemetry driver
Date: Fri, 25 Apr 2025 12:52:28 -0700	[thread overview]
Message-ID: <20250425195237.493129-1-xi.pardee@linux.intel.com> (raw)

This patch series removes the SSRAM support from Intel PMC Core driver
and creates a separate PCI driver for SSRAM device. The new Intel PMC
SSRAM driver provides the following functionalities:

1. Search and store the PMC information in a structure, including PWRMBASE
address and devid for each available PMC. Then Intel PMC Core driver
achieves the PMC information using the API provided by the new driver.
2. Search and register Intel Platform Monitoring Techology telemetry
regions so they would by available for read through sysfs and Intel PMT
API. Intel PMC Core driver can achieve Low Power Mode requirement
information from a telemetry region registered by the new driver.

The above functionalities was previously handled by Intel PMC Core
driver. Intel PMC Core driver returns -EPROBE_DEFER when trying to read
data from a telem region that is not available yet. This setup may
result in an infinite loop of .probe() calls as Intel PMC Core driver
creates child devices. Creating a separate PCI driver avoids the infinite
loop possibility.

v5->v4:
- Remove unneeded changes in pmc_core_ssram_get_lpm_reqs()
- Replace mutex_init() with devm_mutex_init()
 
V4->v3:
- Remove the first six patches that are accepted.
- Add a patch to change the return type of intel_vsec_registeri() from
  void to int.
- Change the return type of pmc_ssram_telemetry_get_pmc() so the probe
  function of Intel PMC SSRAM Telemetry driver will fail if
  intel_vsec_register() fails. The previous implementation hides the
  failure.
- Use __free(pci_dev_put) in core.c.
- Move pmc_ssram_telemetry_get_pmc_info() function comment to c file
  from h file.
- Add a patch to improve pmc_core_get_lpm_req() suggested by comment
  from last version.
 
v3->v2:
- Add memory barriers to the new driver to ensure write/read order of
  device_probed variable.
- Minor grammar changes: add needed white space and end of life new line.
- Add patch to move error handling to init function.
- Remove patch to enable SSRAM support of LNL platforms. This patch will be
  included in a separate series.

v2->v1:
- Rearrange and restructure patches completely based on feedback from v1
 
Xi Pardee (5):
  platform/x86:intel/vsec: Change return type of intel_vsec_register
  platform/x86:intel/pmc: Create Intel PMC SSRAM Telemetry driver
  platform/x86:intel/pmc: Use devm for mutex_init
  platform/x86:intel/pmc: Move error handling to init function
  platform/x86:intel/pmc: Improve pmc_core_get_lpm_req()

 drivers/platform/x86/intel/pmc/Kconfig        |   4 +
 drivers/platform/x86/intel/pmc/Makefile       |   8 +-
 drivers/platform/x86/intel/pmc/core.c         | 189 +++++++++++-------
 drivers/platform/x86/intel/pmc/core.h         |   7 -
 .../platform/x86/intel/pmc/ssram_telemetry.c  | 147 +++++++++-----
 .../platform/x86/intel/pmc/ssram_telemetry.h  |  24 +++
 drivers/platform/x86/intel/vsec.c             |   9 +-
 include/linux/intel_vsec.h                    |   5 +-
 8 files changed, 260 insertions(+), 133 deletions(-)
 create mode 100644 drivers/platform/x86/intel/pmc/ssram_telemetry.h

-- 
2.43.0


             reply	other threads:[~2025-04-25 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 19:52 Xi Pardee [this message]
2025-04-25 19:52 ` [PATCH v5 1/5] platform/x86:intel/vsec: Change return type of intel_vsec_register Xi Pardee
2025-04-25 19:52 ` [PATCH v5 2/5] platform/x86:intel/pmc: Create Intel PMC SSRAM Telemetry driver Xi Pardee
2025-04-25 19:52 ` [PATCH v5 3/5] platform/x86:intel/pmc: Use devm for mutex_init Xi Pardee
2025-04-25 19:52 ` [PATCH v5 4/5] platform/x86:intel/pmc: Move error handling to init function Xi Pardee
2025-04-25 19:52 ` [PATCH v5 5/5] platform/x86:intel/pmc: Improve pmc_core_get_lpm_req() Xi Pardee
2025-04-29 15:01 ` [PATCH v5 0/5] Create Intel PMC SSRAM Telemetry driver 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=20250425195237.493129-1-xi.pardee@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