<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/acpi/processor_idle.c, branch v5.18.16</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.16</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.16'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-04-21T17:58:14Z</updated>
<entry>
<title>Revert "ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40"</title>
<updated>2022-04-21T17:58:14Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2022-04-20T13:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=20e582e16af24b074e583f9551fad557882a3c9d'/>
<id>urn:sha1:20e582e16af24b074e583f9551fad557882a3c9d</id>
<content type='text'>
This reverts commit bfe55a1f7fd6bfede16078bf04c6250fbca11588.

This was presumably misdiagnosed as an inability to use C3 at
all when I suspect the real problem is just misconfiguration of
C3 vs. ARB_DIS.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: 5.16+ &lt;stable@vger.kernel.org&gt; # 5.16+
Tested-by: Woody Suwalski &lt;wsuwalski@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor: idle: Avoid falling back to C3 type C-states</title>
<updated>2022-04-21T17:55:41Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2022-04-21T13:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fc45e55ebc58dbf622cb89ddbf797589c7a5510b'/>
<id>urn:sha1:fc45e55ebc58dbf622cb89ddbf797589c7a5510b</id>
<content type='text'>
The "safe state" index is used by acpi_idle_enter_bm() to avoid
entering a C-state that may require bus mastering to be disabled
on entry in the cases when this is not going to happen.  For this
reason, it should not be set to point to C3 type of C-states, because
they may require bus mastering to be disabled on entry in principle.

This was broken by commit d6b88ce2eb9d ("ACPI: processor idle: Allow
playing dead in C3 state") which inadvertently allowed the "safe
state" index to point to C3 type of C-states.

This results in a machine that won't boot past the point when it first
enters C3. Restore the correct behaviour (either demote to C1/C2, or
use C3 but also set ARB_DIS=1).

I hit this on a Fujitsu Siemens Lifebook S6010 (P3) machine.

Fixes: d6b88ce2eb9d ("ACPI: processor idle: Allow playing dead in C3 state")
Cc: 5.16+ &lt;stable@vger.kernel.org&gt; # 5.16+
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Tested-by: Woody Suwalski &lt;wsuwalski@gmail.com&gt;
[ rjw: Subject and changelog adjustments ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "ACPI: processor: idle: Only flush cache on entering C3"</title>
<updated>2022-04-04T18:51:15Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@gmail.com</email>
</author>
<published>2022-04-03T06:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfbba2518aac4204203b0697a894d3b2f80134d3'/>
<id>urn:sha1:dfbba2518aac4204203b0697a894d3b2f80134d3</id>
<content type='text'>
Revert commit 87ebbb8c612b ("ACPI: processor: idle: Only flush cache
on entering C3") that broke the assumptions of the acpi_idle_play_dead()
callers.

Namely, the CPU cache must always be flushed in acpi_idle_play_dead(),
regardless of the target C-state that is going to be requested, because
this is likely to be part of a CPU offline procedure or preparation for
entering a system-wide sleep state and the lack of synchronization
between the CPU cache and RAM may lead to problems going forward, for
example when the CPU is brought back online.

In particular, it breaks resume from suspend-to-RAM on Lenovo ThinkPad
C13 which fails occasionally until the problematic commit is reverted.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@gmail.com&gt;
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor idle: Check for architectural support for LPI</title>
<updated>2022-03-03T19:20:06Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-02-25T19:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb087f305919ee8169ad65665610313e74260463'/>
<id>urn:sha1:eb087f305919ee8169ad65665610313e74260463</id>
<content type='text'>
When `osc_pc_lpi_support_confirmed` is set through `_OSC` and `_LPI` is
populated then the cpuidle driver assumes that LPI is fully functional.

However currently the kernel only provides architectural support for LPI
on ARM.  This leads to high power consumption on X86 platforms that
otherwise try to enable LPI.

So probe whether or not LPI support is implemented before enabling LPI in
the kernel.  This is done by overloading `acpi_processor_ffh_lpi_probe` to
check whether it returns `-EOPNOTSUPP`. It also means that all future
implementations of `acpi_processor_ffh_lpi_probe` will need to follow
these semantics as well.

Reviewed-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40</title>
<updated>2022-02-16T17:17:16Z</updated>
<author>
<name>Woody Suwalski</name>
<email>wsuwalski@gmail.com</email>
</author>
<published>2022-02-09T21:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bfe55a1f7fd6bfede16078bf04c6250fbca11588'/>
<id>urn:sha1:bfe55a1f7fd6bfede16078bf04c6250fbca11588</id>
<content type='text'>
Add and ACPI idle power level limit for 32-bit ThinkPad T40.

There is a regression on T40 introduced by commit d6b88ce2, starting
with kernel 5.16:

commit d6b88ce2eb9d2698eb24451eb92c0a1649b17bb1
Author: Richard Gong &lt;richard.gong@amd.com&gt;
Date:   Wed Sep 22 08:31:16 2021 -0500

  ACPI: processor idle: Allow playing dead in C3 state

The above patch is trying to enter C3 state during init, what is causing
a T40 system freeze. I have not found a similar issue on any other of my
32-bit machines.

The fix is to add another exception to the processor_power_dmi_table[] list.
As a result the dmesg shows as expected:

[2.155398] ACPI: IBM ThinkPad T40 detected - limiting to C2 max_cstate. Override with "processor.max_cstate=9"
[2.155404] ACPI: processor limited to max C-state 2

The fix is trivial and affects only vintage T40 systems.

Fixes: d6b88ce2eb9d ("CPI: processor idle: Allow playing dead in C3 state")
Signed-off-by: Woody Suwalski &lt;wsuwalski@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: 5.16+ &lt;stable@vger.kernel.org&gt; # 5.16+
[ rjw: New subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'acpi-ec' and 'acpi-processor'</title>
<updated>2022-01-10T15:57:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-01-10T15:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5847d2d2efaab724b7ab374b6fca105e24509c92'/>
<id>urn:sha1:5847d2d2efaab724b7ab374b6fca105e24509c92</id>
<content type='text'>
Merge ACPI EC driver updates and ACPI processor driver updates for
5.17-rc1:

 - Rework flushing of EC work while suspended to idle and clean up
   the handling of events in the ACPI EC driver (Rafael Wysocki).

 - Prohibit ec_sys module parameter write_support from being used
   when the system is locked down (Hans de Goede).

 - Make the ACPI processor thermal driver use cpufreq_cpu_get() to
   check for presence of cpufreq policy (Manfred Spraul).

 - Avoid unnecessary CPU cache flushing in the ACPI processor idle
   driver (Kirill A. Shutemov).

 - Replace kernel.h with the necessary inclusions in the ACPI
   processor driver (Andy Shevchenko).

 - Use swap() instead of open coding it in the ACPI processor idle
   driver (Guo Zhengkui).

* acpi-ec:
  ACPI: EC: Mark the ec_sys write_support param as module_param_hw()
  ACPI: EC: Relocate acpi_ec_create_query() and drop acpi_ec_delete_query()
  ACPI: EC: Make the event work state machine visible
  ACPI: EC: Avoid queuing unnecessary work in acpi_ec_submit_event()
  ACPI: EC: Rename three functions
  ACPI: EC: Simplify locking in acpi_ec_event_handler()
  ACPI: EC: Rearrange the loop in acpi_ec_event_handler()
  ACPI: EC: Fold acpi_ec_check_event() into acpi_ec_event_handler()
  ACPI: EC: Pass one argument to acpi_ec_query()
  ACPI: EC: Call advance_transaction() from acpi_ec_dispatch_gpe()
  ACPI: EC: Rework flushing of EC work while suspended to idle

* acpi-processor:
  ACPI: processor: thermal: avoid cpufreq_get_policy()
  ACPI: processor: idle: Only flush cache on entering C3
  ACPI: processor idle: Use swap() instead of open coding it
  ACPI: processor: Replace kernel.h with the necessary inclusions
</content>
</entry>
<entry>
<title>ACPI: processor: idle: Only flush cache on entering C3</title>
<updated>2021-12-17T17:54:56Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2021-12-06T12:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87ebbb8c612b1214f227ebb8f25442c6d163e802'/>
<id>urn:sha1:87ebbb8c612b1214f227ebb8f25442c6d163e802</id>
<content type='text'>
According to ACPI 6.4, Section 8.2, CPU cache flushing required on
entering the C3 power state.

Avoid flushing the cache on entering other C-states.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()</title>
<updated>2021-12-17T17:45:51Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2021-12-03T16:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a'/>
<id>urn:sha1:99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a</id>
<content type='text'>
Modify the ACPI code to use acpi_fetch_acpi_dev() instead of
acpi_bus_get_device() where applicable.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor idle: Use swap() instead of open coding it</title>
<updated>2021-11-24T16:46:12Z</updated>
<author>
<name>Guo Zhengkui</name>
<email>guozhengkui@vivo.com</email>
</author>
<published>2021-11-09T07:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e6078c3c6737df7d0bd0c890fbadf24a27fffbb'/>
<id>urn:sha1:0e6078c3c6737df7d0bd0c890fbadf24a27fffbb</id>
<content type='text'>
Address the following coccicheck warning:

./drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:914:40-41:
WARNING opportunity for swap().

by using swap() for the swapping of variable values and drop
the tmp variable that is not needed any more.

Signed-off-by: Guo Zhengkui &lt;guozhengkui@vivo.com&gt;
[ rjw: Subject and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor idle: Allow playing dead in C3 state</title>
<updated>2021-09-24T16:26:27Z</updated>
<author>
<name>Richard Gong</name>
<email>richard.gong@amd.com</email>
</author>
<published>2021-09-22T13:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b88ce2eb9d2698eb24451eb92c0a1649b17bb1'/>
<id>urn:sha1:d6b88ce2eb9d2698eb24451eb92c0a1649b17bb1</id>
<content type='text'>
When some cores are disabled on AMD platforms, the system will no longer
be able to enter suspend-to-idle s0ix.

Update to allow playing dead in C3 state so that the CPUs can enter the
deepest state on AMD platforms.

BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1708
Suggested-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Richard Gong &lt;richard.gong@amd.com&gt;
[ rjw: Fixed coding style ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
