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: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_apd.c ACPI: Remove clk.h include 2015-07-20 10:52:45 -07:00
acpi_cmos_rtc.c ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses 2014-09-08 15:38:41 +02:00
acpi_extlog.c ACPI and power management updates for 3.17-rc1 2014-08-06 20:34:19 -07:00
acpi_ipmi.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_lpat.c ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
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: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
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 / scan: constify first argument of struct acpi_scan_handler::match 2015-09-15 02:56:29 +02:00
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 ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
battery.h ACPI / battery: move some ACPI_BATTERY_* definitions to header 2014-03-19 01:57:46 +01:00
bgrt.c acpi: bgrt: fix build error due to attribute change 2013-08-22 08:34:39 -07:00
blacklist.c ACPI / blacklist: Make Dell Latitude 3350 ethernet work 2017-03-30 09:35:20 +02:00
bus.c ACPI / processor: Request native thermal interrupt handling via _OSC 2016-05-11 11:21:26 +02:00
button.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cm_sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
container.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
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 ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
debugfs.c ACPI: fix acpi_debugfs_init prototype 2015-08-07 02:55:18 +02:00
device_pm.c PM / PCI / ACPI: Kick devices that might have been reset by firmware 2015-10-14 02:17:34 +02:00
device_sysfs.c ACPI / bus: Leave modalias empty for devices which are not present 2018-02-03 17:04:27 +01:00
dock.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
ec.c ACPI / EC: Work around method reentrancy limit in ACPICA for _Qxx 2016-08-20 18:09:27 +02:00
ec_sys.c ACPI / EC: Fix broken 64bit big-endian users of 'global_lock' 2015-10-04 11:36:07 +01:00
event.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
fan.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
glue.c ACPI / scan: Prefer devices without _HID/_CID for _ADR matching 2018-01-31 12:06:09 +01:00
gsi.c acpi/gsi: Cleanup acpi_register_gsi 2015-10-13 19:01:25 +02:00
hed.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
int340x_thermal.c ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
internal.h ACPI / processor: Request native thermal interrupt handling via _OSC 2016-05-11 11:21:26 +02:00
ioapic.c ACPI: ioapic: Clear on-stack resource before using it 2017-08-30 10:19:29 +02:00
Kconfig Merge branches 'acpica', 'acpi-video' and 'device-properties' 2015-12-04 14:01:17 +01:00
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 ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +02:00
osl.c ACPI / osi: Fix an issue that acpi_osi=!* cannot disable ACPICA internal strings 2016-06-01 12:15:50 -07:00
pci_irq.c ACPI, PCI, irq: remove redundant check for null string pointer 2018-04-08 11:51:56 +02:00
pci_link.c ACPI / PCI: Remove duplicated penalty on SCI IRQ 2015-09-26 01:53:07 +02:00
pci_root.c PCI: pciehp: Request control of native hotplug only if supported 2018-08-06 16:24:34 +02:00
pci_slot.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
power.c ACPI / power: Avoid maybe-uninitialized warning 2017-04-27 09:09:33 +02:00
proc.c ACPI: change acpi_sleep_proc_init() to return void 2015-09-15 03:03:15 +02:00
processor_core.c ACPI / processor: Introduce invalid_phys_cpuid() 2015-05-13 23:28:16 +02:00
processor_driver.c ACPI/processor: Replace racy task affinity logic 2018-03-24 10:58:40 +01:00
processor_idle.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_pdc.c ACPI / processor: Introduce invalid_logical_cpuid() 2015-05-13 23:28:14 +02:00
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 ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_throttling.c ACPI/processor: Replace racy task affinity logic 2018-03-24 10:58:40 +01:00
property.c ACPI / property: Fix subnode lookup scope for data-only subnodes 2015-10-22 00:54:03 +02:00
reboot.c Revert "ACPI: ignore FADT reset-reg-sup flag" 2012-04-20 11:19:35 -07:00
resource.c PCI: ACPI: IA64: fix IO port generic range check 2016-04-12 09:08:37 -07:00
sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
sbshc.c ACPI: sbshc: remove raw pointer from printk() message 2018-02-16 20:09:47 +01:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
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 ACPI / sleep: Drop acpi_suspend() which is not used 2015-03-18 12:53:21 +01:00
sysfs.c ACPI / sysfs: fix error code in get_status() 2016-09-07 08:32:45 +02:00
tables.c ACPI / tables: test the correct variable 2015-10-15 01:31:24 +02:00
thermal.c linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS 2015-10-10 11:32:30 +08:00
utils.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
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 ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00