android_kernel_oneplus_msm8998/drivers/acpi
Willy Tarreau c2650d43a4 ACPI / PM: save NVS memory for ASUS 1025C laptop
commit 231f9415001138a000cd0f881c46654b7ea3f8c5 upstream.

Every time I tried to upgrade my laptop from 3.10.x to 4.x I faced an
issue by which the fan would run at full speed upon resume. Bisecting
it showed me the issue was introduced in 3.17 by commit 821d6f0359
(ACPI / sleep: Do not save NVS for new machines to accelerate S3). This
code only affects machines built starting as of 2012, but this Asus
1025C laptop was made in 2012 and apparently needs the NVS data to be
saved, otherwise the CPU's thermal state is not properly reported on
resume and the fan runs at full speed upon resume.

Here's a very simple way to check if such a machine is affected :

  # cat /sys/class/thermal/thermal_zone0/temp
  55000

  ( now suspend, wait one second and resume )

  # cat /sys/class/thermal/thermal_zone0/temp
  0

  (and after ~15 seconds the fan starts to spin)

Let's apply the same quirk as commit cbc00c13 (ACPI: save NVS memory
for Lenovo G50-45) and reuse the function it provides. Note that this
commit was already backported to 4.9.x but not 4.4.x.

Cc: 3.17+ <stable@vger.kernel.org> # 3.17+: requires cbc00c13
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22 07:48:37 +02:00
..
acpica ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c 2018-05-30 07:49:11 +02:00
apei ACPI: APEI / ERST: Fix missing error handling in erst_reader() 2018-01-02 20:33:19 +01:00
pmic ACPI / PMIC: xpower: Fix power_table addresses 2018-03-24 10:58:45 +01:00
ac.c
acpi_apd.c
acpi_cmos_rtc.c
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c
acpi_lpss.c ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices 2018-08-15 17:42:05 +02:00
acpi_memhotplug.c
acpi_pad.c ACPI: acpi_pad: Fix memory leak in power saving threads 2018-05-30 07:49:09 +02:00
acpi_platform.c ACPI: Do not create a platform_device for IOAPIC/IOxAPIC 2017-04-08 09:53:31 +02:00
acpi_pnp.c
acpi_processor.c ACPI / processor: Avoid reserving IO regions too early 2018-01-31 12:06:09 +01:00
acpi_video.c ACPI / video: skip evaluating _DOD when it does not exist 2017-03-26 12:13:17 +02:00
battery.c
battery.h
bgrt.c
blacklist.c ACPI / blacklist: Make Dell Latitude 3350 ethernet work 2017-03-30 09:35:20 +02:00
bus.c
button.c
cm_sbs.c
container.c
cppc_acpi.c ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data 2016-09-07 08:32:38 +02:00
custom_method.c
debugfs.c
device_pm.c
device_sysfs.c ACPI / bus: Leave modalias empty for devices which are not present 2018-02-03 17:04:27 +01:00
dock.c
ec.c
ec_sys.c
event.c
fan.c
glue.c ACPI / scan: Prefer devices without _HID/_CID for _ADR matching 2018-01-31 12:06:09 +01:00
gsi.c
hed.c
int340x_thermal.c
internal.h
ioapic.c ACPI: ioapic: Clear on-stack resource before using it 2017-08-30 10:19:29 +02:00
Kconfig
Makefile ACPI: Fix incompatibility with mcount-based function graph tracing 2017-04-08 09:53:31 +02:00
nfit.c acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison) 2017-04-21 09:30:05 +02:00
nfit.h acpi, nfit: check for the correct event code in notifications 2016-10-28 03:01:34 -04:00
numa.c acpi, numa: fix pxm to online numa node associations 2018-03-28 18:40:15 +02:00
nvs.c
osl.c
pci_irq.c ACPI, PCI, irq: remove redundant check for null string pointer 2018-04-08 11:51:56 +02:00
pci_link.c
pci_root.c PCI: pciehp: Request control of native hotplug only if supported 2018-08-06 16:24:34 +02:00
pci_slot.c
power.c ACPI / power: Avoid maybe-uninitialized warning 2017-04-27 09:09:33 +02:00
proc.c
processor_core.c
processor_driver.c ACPI/processor: Replace racy task affinity logic 2018-03-24 10:58:40 +01:00
processor_idle.c
processor_pdc.c
processor_perflib.c ACPI: processor_perflib: Do not send _PPC change notification if not ready 2018-05-30 07:48:56 +02:00
processor_thermal.c
processor_throttling.c ACPI/processor: Replace racy task affinity logic 2018-03-24 10:58:40 +01:00
property.c
reboot.c
resource.c
sbs.c
sbshc.c ACPI: sbshc: remove raw pointer from printk() message 2018-02-16 20:09:47 +01:00
sbshc.h
scan.c ACPI / drivers: replace acpi_probe_lock spinlock with mutex 2016-09-07 08:32:45 +02:00
sleep.c ACPI / PM: save NVS memory for ASUS 1025C laptop 2018-08-22 07:48:37 +02:00
sleep.h
sysfs.c ACPI / sysfs: fix error code in get_status() 2016-09-07 08:32:45 +02:00
tables.c
thermal.c
utils.c
video_detect.c ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E 2018-04-24 09:32:06 +02:00
wakeup.c