OpenCloudOS-Kernel/drivers/platform/x86
Mario Limonciello 68af28426b platform/x86: amd-pmc: Set QOS during suspend on CZN w/ timer wakeup
commit 59348401eb ("platform/x86: amd-pmc: Add special handling for
timer based S0i3 wakeup") adds support for using another platform timer
in lieu of the RTC which doesn't work properly on some systems. This path
was validated and worked well before submission. During the 5.16-rc1 merge
window other patches were merged that caused this to stop working properly.

When this feature was used with 5.16-rc1 or later some OEM laptops with the
matching firmware requirements from that commit would shutdown instead of
program a timer based wakeup.

This was bisected to commit 8d89835b04 ("PM: suspend: Do not pause
cpuidle in the suspend-to-idle path").  This wasn't supposed to cause any
negative impacts and also tested well on both Intel and ARM platforms.
However this changed the semantics of when CPUs are allowed to be in the
deepest state. For the AMD systems in question it appears this causes a
firmware crash for timer based wakeup.

It's hypothesized to be caused by the `amd-pmc` driver sending `OS_HINT`
and all the CPUs going into a deep state while the timer is still being
programmed. It's likely a firmware bug, but to avoid it don't allow setting
CPUs into the deepest state while using CZN timer wakeup path.

If later it's discovered that this also occurs from "regular" suspends
without a timer as well or on other silicon, this may be later expanded to
run in the suspend path for more scenarios.

Cc: stable@vger.kernel.org # 5.16+
Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/linux-acpi/BL1PR12MB51570F5BD05980A0DCA1F3F4E23A9@BL1PR12MB5157.namprd12.prod.outlook.com/T/#mee35f39c41a04b624700ab2621c795367f19c90e
Fixes: 8d89835b04 ("PM: suspend: Do not pause cpuidle in the suspend-to-idle path")
Fixes: 23f62d7ab2 ("PM: sleep: Pause cpuidle later and resume it earlier during system transitions")
Fixes: 59348401eb ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup"
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220223175237.6209-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-02-24 13:48:34 +01:00
..
dell platform/x86: dell-wmi-descriptor: disable by default 2021-11-16 10:56:53 +01:00
intel platform/x86: int3472: Add terminator to gpiod_lookup_table 2022-02-21 14:47:59 +01:00
Kconfig platform-drivers-x86 for v5.17-1 2022-01-11 11:26:57 -08:00
Makefile platform/x86: Add Asus TF103C dock driver 2022-01-05 12:06:19 +01:00
acer-wireless.c acer-wireless: send an EV_SYN/SYN_REPORT between state changes 2020-12-07 16:10:11 +01:00
acer-wmi.c platform/x86: acer-wmi: use __packed instead of __attribute__((packed)) 2021-09-14 12:27:15 +02:00
acerhdf.c thermal/core: Remove ms based delay fields 2021-01-19 22:23:49 +01:00
adv_swbutton.c platform/x86: add support for Advantech software defined button 2021-04-07 19:46:56 +02:00
amd-pmc.c platform/x86: amd-pmc: Set QOS during suspend on CZN w/ timer wakeup 2022-02-24 13:48:34 +01:00
amilo-rfkill.c
apple-gmux.c platform/x86: apple-gmux: use resource_size() with res 2021-12-21 19:35:33 +01:00
asus-laptop.c platform/x86: asus-laptop: fix kobj_to_dev.cocci warnings 2021-03-23 21:06:10 +01:00
asus-nb-wmi.c platform/x86: asus-nb-wmi: Add tablet_mode_sw=lid-flip quirk for the TP200s 2021-08-12 17:18:28 +02:00
asus-tf103c-dock.c platform/x86: asus-tf103c-dock: Make 2 global structs static 2022-01-24 10:41:47 +01:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Fix regression when probing for fan curve control 2022-02-05 14:46:08 +01:00
asus-wmi.h platform/x86: asus-wmi: Add support for SW_TABLET_MODE on UX360 2020-10-28 12:47:37 +01:00
barco-p50-gpio.c platform/x86: barco-p50-gpio: use KEY_VENDOR for button instead of KEY_RESTART 2021-10-24 10:17:46 +02:00
classmate-laptop.c platform/x86: Typo fix in the file classmate-laptop.c 2021-03-23 21:05:58 +01:00
compal-laptop.c
dual_accel_detect.h platform/x86: dual_accel_detect: Use the new i2c_acpi_client_count() helper 2021-08-12 17:26:36 +02:00
eeepc-laptop.c
eeepc-wmi.c
firmware_attributes_class.c platform/x86: dell-wmi-sysman: fw_attr_inuse can be static 2021-06-16 17:47:52 +02:00
firmware_attributes_class.h platform/x86: firmware_attributes_class: Create helper file for handling firmware-attributes class registration events 2021-06-16 17:47:51 +02:00
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte-wmi: add support for B550 AORUS ELITE AX V2 2021-10-11 15:54:38 +02:00
gpd-pocket-fan.c platform/x86: gpd pocket fan: Clean-up by using managed work init 2021-03-23 15:22:40 +01:00
hdaps.c platform/x86: hdaps: Constify static attribute_group struct 2021-06-16 17:47:54 +02:00
hp-wmi.c platform/x86: hp-wmi: rename platform_profile_* function symbols 2021-10-27 16:07:31 +02:00
hp_accel.c platform/x86: hp_accel: Use SIMPLE_DEV_PM_OPS() for PM ops 2021-12-07 12:21:01 +01:00
huawei-wmi.c
i2c-multi-instantiate.c Revert "platform/x86: i2c-multi-instantiate: Don't create platform device for INT3515 ACPI nodes" 2021-10-20 19:31:13 +02:00
ibm_rtl.c
ideapad-laptop.c platform: x86: ideapad-laptop: Use ACPI_COMPANION() directly 2021-10-19 16:55:56 +02:00
intel_ips.c platform/x86: intel_ips: fix set but unused warning in read_mgtv 2021-06-16 17:47:55 +02:00
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Update timeout value in comment 2021-10-11 15:34:51 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c sfi: Remove framework for deprecated firmware 2021-02-15 20:09:46 +01:00
intel_scu_pltdrv.c
intel_scu_wdt.c platform/x86: intel_scu_wdt: Drop mistakenly added const 2021-02-05 12:54:27 +02:00
lenovo-yogabook-wmi.c platform/x86: lenovo-yogabook-wmi: Add support for hall sensor on the back 2021-12-07 12:21:01 +01:00
lg-laptop.c platform/x86: lg-laptop: Recognize more models 2021-12-02 12:58:26 +01:00
meraki-mx100.c platform/x86: add meraki-mx100 platform driver 2021-08-12 09:26:28 +02:00
mlx-platform.c platform/x86: mlx-platform: Add support for new system SGN2410 2021-10-27 16:29:03 +02:00
msi-laptop.c
msi-wmi.c platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning 2021-02-04 13:35:20 +01:00
mxm-wmi.c
nvidia-wmi-ec-backlight.c platform/x86: Rename wmaa-backlight-wmi to nvidia-wmi-ec-backlight 2021-10-11 14:59:45 +02:00
panasonic-laptop.c platform/x86: panasonic-laptop: Replace snprintf in show functions with sysfs_emit 2021-10-19 16:59:44 +02:00
pcengines-apuv2.c platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables 2021-08-06 14:04:43 +02:00
peaq-wmi.c
pmc_atom.c platform/x86: pmc_atom: improve critclk_systems matching for Siemens PCs 2021-12-23 18:09:41 +01:00
samsung-laptop.c platform/x86: samsung-laptop: Fix typo in a comment 2021-11-16 10:56:53 +01:00
samsung-q10.c
simatic-ipc.c platform/x86: simatic-ipc: add main driver for Siemens devices 2021-12-23 18:09:06 +01:00
sony-laptop.c platform/x86: sony-laptop: replace snprintf in show functions with sysfs_emit 2021-10-22 11:13:25 +02:00
system76_acpi.c platform/x86: system76_acpi: Guard System76 EC specific functionality 2021-12-23 17:26:28 +01:00
tc1100-wmi.c platform/x86: tc1100-wmi: Constify static attribute_group struct 2021-06-16 17:47:54 +02:00
think-lmi.c platform/x86: think-lmi: Prevent underflow in index_store() 2021-12-21 18:57:14 +01:00
think-lmi.h platform/x86: think-lmi: Opcode support 2021-11-18 12:29:30 +01:00
thinkpad_acpi.c platform/x86: thinkpad_acpi: Add dual-fan quirk for T15g (2nd gen) 2022-02-03 11:34:06 +01:00
topstar-laptop.c
toshiba-wmi.c
toshiba_acpi.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
toshiba_bluetooth.c
toshiba_haps.c platform/x86: toshiba_haps: Fix missing newline in pr_debug call in toshiba_haps_notify 2021-06-16 17:47:49 +02:00
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add info for the RWC NANOTE P8 AY07J 2-in-1 2022-01-24 10:41:45 +01:00
uv_sysfs.c x86/platform/uv: use default_groups in kobj_type 2021-12-30 19:32:23 +01:00
wireless-hotkey.c platform/x86: wireless-hotkey: remove hardcoded "hp" from the error message 2021-07-14 22:32:26 +02:00
wmi-bmof.c platform/x86: wmi: Make remove callback return void 2021-03-08 11:33:39 +01:00
wmi.c platform/x86: wmi: Add no_notify_data flag to struct wmi_driver 2021-12-06 22:33:39 +01:00
x86-android-tablets.c platform/x86: x86-android-tablets: Trivial typo fix for MODULE_AUTHOR 2022-01-24 10:41:45 +01:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c platform: x86: ACPI: Get rid of ACPICA message printing 2021-03-08 11:33:39 +01:00