mbox series

[v4,0/5] x86: atom-punit/-pmc s2idle device state checks

Message ID 20240305105915.76242-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series x86: atom-punit/-pmc s2idle device state checks | expand

Message

Hans de Goede March 5, 2024, 10:59 a.m. UTC
Hi All,

Here is v4 of this patch series to add S0ix related s2idle
checks to the pmc_atom and punit_atom code.

Changes in v4:
- Add pmc_s2idle_check_register() helper which is a stub when
  CONFIG_SUSPEND is not set to avoid needing more then 1 ifdef
- Add a couple of Acked-by and Reviewed-by tags

Patches 1/5 and 5/5 have Acked-by-s from the clk resp. x86 maintainers to
be merged through the pdx86 tree together with the rest of the series.

Ilpo, I believe that this is ready for merging now. It would be great if
you can still pick this up for the 6.9 cycle. OTOH there is no big rush
to get these debug patches for older platforms merged. So postponing
them to the next cycle is fine too.

Below is the previous cover-letter of v3 with some more background info:

These patches are an upstream submission of a patch titled:
"Intel Atom suspend: add debug check for S0ix blockers"

Which I have been carrying in my personal kernel tree for years now.
This code originally comes from the latte-l-oss branch of:
https://github.com/MiCode/Xiaomi_Kernel_OpenSource

And has been posted on upstream mailinglists before by
Johannes Stezenbach, whose authorship I have kept for
the 2 base patches and has been reposted by Takashi Iwai
and at one point in time I picked this up from Takashi's
reposting as can be seen from the S-o-b lines. Unfortunately
I cannot find the original postings, so I have no link to
those.

The original version of this added some ugly hooks into
the intel_idle driver which I presume is why these patches
never got anywhere upstream.

With the new acpi_s2idle_dev_ops and acpi_register_lps0_dev()
functionality this functionality can now be implemented cleanly
and that is what this patch-series does.

Changes in v3:
- Reword commit message of patch 3/5 and 5/5
- Drop confusing /* Low Part */ and /* High Part */ comments in pmc_atom.c
- Add punit_s2idle_check_[un]register() helper functions

Changes in v2:
- Move CLK reg defines to include/linux/platform_data/x86/pmc_atom.h
- Drop duplicated "pmc_atom: " prefix from logged messages

Regards,

Hans


Hans de Goede (3):
  clk: x86: Move clk-pmc-atom register defines to
    include/linux/platform_data/x86/pmc_atom.h
  platform/x86: pmc_atom: Annotate d3_sts register bit defines
  platform/x86: pmc_atom: Check state of PMC clocks on s2idle

Johannes Stezenbach (2):
  platform/x86: pmc_atom: Check state of PMC managed devices on s2idle
  x86/platform/atom: Check state of Punit managed devices on s2idle

 arch/x86/platform/atom/punit_atom_debug.c  | 54 ++++++++++++++-
 drivers/clk/x86/clk-pmc-atom.c             | 13 +---
 drivers/platform/x86/pmc_atom.c            | 79 ++++++++++++++++++++++
 include/linux/platform_data/x86/pmc_atom.h | 25 +++++--
 4 files changed, 152 insertions(+), 19 deletions(-)

Comments

Ilpo Järvinen March 6, 2024, 11:17 a.m. UTC | #1
On Tue, 05 Mar 2024 11:59:10 +0100, Hans de Goede wrote:

> Here is v4 of this patch series to add S0ix related s2idle
> checks to the pmc_atom and punit_atom code.
> 
> Changes in v4:
> - Add pmc_s2idle_check_register() helper which is a stub when
>   CONFIG_SUSPEND is not set to avoid needing more then 1 ifdef
> - Add a couple of Acked-by and Reviewed-by tags
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/5] clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h
      commit: 2ad8bda51c6069fa2d616ed57dc3ba8a3ec26ca4
[2/5] platform/x86: pmc_atom: Annotate d3_sts register bit defines
      commit: 5c3fc0ff939b0390128dfa852fc56b89016c0884
[3/5] platform/x86: pmc_atom: Check state of PMC managed devices on s2idle
      commit: cc7922fff7ee652577165c4fe6035429ccc175cc
[4/5] platform/x86: pmc_atom: Check state of PMC clocks on s2idle
      commit: cbb1c5f2b02da78169b6bacf506777f99ed07596
[5/5] x86/platform/atom: Check state of Punit managed devices on s2idle
      commit: ea2b3b2292fed64ed9b8451c03d638d61902badc

--
 i.