android_kernel_samsung_univ.../drivers
Srinivas Pandruvada dfa11d5862 ACPI / processor: Request native thermal interrupt handling via _OSC
commit a21211672c9a1d730a39aa65d4a5b3414700adfb upstream.

There are several reports of freeze on enabling HWP (Hardware PStates)
feature on Skylake-based systems by the Intel P-states driver. The root
cause is identified as the HWP interrupts causing BIOS code to freeze.

HWP interrupts use the thermal LVT which can be handled by Linux
natively, but on the affected Skylake-based systems SMM will respond
to it by default.  This is a problem for several reasons:
 - On the affected systems the SMM thermal LVT handler is broken (it
   will crash when invoked) and a BIOS update is necessary to fix it.
 - With thermal interrupt handled in SMM we lose all of the reporting
   features of the arch/x86/kernel/cpu/mcheck/therm_throt driver.
 - Some thermal drivers like x86-package-temp depend on the thermal
   threshold interrupts signaled via the thermal LVT.
 - The HWP interrupts are useful for debugging and tuning
   performance (if the kernel can handle them).
The native handling of thermal interrupts needs to be enabled
because of that.

This requires some way to tell SMM that the OS can handle thermal
interrupts.  That can be done by using _OSC/_PDC in processor
scope very early during ACPI initialization.

The meaning of _OSC/_PDC bit 12 in processor scope is whether or
not the OS supports native handling of interrupts for Collaborative
Processor Performance Control (CPPC) notifications.  Since on
HWP-capable systems CPPC is a firmware interface to HWP, setting
this bit effectively tells the firmware that the OS will handle
thermal interrupts natively going forward.

For details on _OSC/_PDC refer to:
http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html

To implement the _OSC/_PDC handshake as described, introduce a new
function, acpi_early_processor_osc(), that walks the ACPI
namespace looking for ACPI processor objects and invokes _OSC for
them with bit 12 in the capabilities buffer set and terminates the
namespace walk on the first success.

Also modify intel_thermal_interrupt() to clear HWP status bits in
the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents
them from firing continuously).

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Subject & changelog, function rename ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-11 11:21:26 +02:00
..
accessibility
acpi ACPI / processor: Request native thermal interrupt handling via _OSC 2016-05-11 11:21:26 +02:00
amba
android
ata ata: ahci-platform: Add ports-implemented DT bindings. 2016-05-11 11:21:21 +02:00
atm
auxdisplay
base PM / Domains: Fix removal of a subdomain 2016-05-04 14:48:51 -07:00
bcma
block nbd: ratelimit error msgs after socket close 2016-05-11 11:21:10 +02:00
bluetooth
bus bus: imx-weim: Take the 'status' property value into account 2016-05-04 14:48:54 -07:00
cdrom
char
clk clk: qcom: msm8960: Fix ce3_src register offset 2016-05-11 11:21:12 +02:00
clocksource
connector
cpufreq
cpuidle ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value 2016-05-11 11:21:19 +02:00
crypto
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon extcon: max77843: Use correct size for reading the interrupt register 2016-05-04 14:48:54 -07:00
firewire
firmware efi: Expose non-blocking set_variable() wrapper to efivars 2016-05-04 14:48:49 -07:00
fmc
fpga
gpio
gpu drm/i915: Fake HDMI live status 2016-05-11 11:21:26 +02:00
hid HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk 2016-05-11 11:21:15 +02:00
hsi
hv
hwmon
hwspinlock
hwtracing stm class: Select CONFIG_SRCU 2016-05-04 14:48:54 -07:00
i2c
ide
idle
iio iio: ak8975: fix maybe-uninitialized warning 2016-05-11 11:21:23 +02:00
infiniband RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips 2016-05-11 11:21:09 +02:00
input Input: zforce_ts - fix dual touch recognition 2016-05-11 11:21:16 +02:00
iommu
ipack
irqchip irqchip/mxs: Fix error check of of_io_request_and_map() 2016-05-04 14:48:50 -07:00
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md MD: make bio mergeable 2016-05-11 11:21:13 +02:00
media videobuf2-v4l2: Verify planes array in buffer dequeueing 2016-05-04 14:48:50 -07:00
memory
memstick
message
mfd mfd: intel-lpss: Remove clock tree on error path 2016-05-11 11:21:10 +02:00
misc drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors 2016-05-04 14:48:52 -07:00
mmc
mtd mtd: nand: Drop mtd.owner requirement in nand_scan 2016-05-04 14:48:52 -07:00
net ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation 2016-05-11 11:21:13 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem nvmem: mxs-ocotp: fix buffer overflow in read 2016-05-11 11:21:21 +02:00
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: s5m8767: fix get_register() error handling 2016-05-04 14:48:50 -07:00
remoteproc
reset
rpmsg
rtc rtc: max77686: Properly handle regmap_irq_get_virq() error code 2016-05-04 14:48:52 -07:00
s390
sbus
scsi lpfc: fix misleading indentation 2016-05-11 11:21:12 +02:00
sfi
sh
sn
soc soc: rockchip: power-domain: fix err handle while probing 2016-05-11 11:21:11 +02:00
spi spi/rockchip: Make sure spi clk is on in rockchip_spi_set_cs 2016-05-04 14:48:50 -07:00
spmi
ssb
staging IB/security: Restrict use of the write() interface 2016-05-04 14:48:48 -07:00
target
tc
thermal thermal: rockchip: fix a impossible condition caused by the warning 2016-05-04 14:48:54 -07:00
thunderbolt
tty serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock 2016-05-04 14:48:52 -07:00
uio
usb USB: serial: cp210x: add Straizona Focusers device ids 2016-05-11 11:21:21 +02:00
uwb
vfio
vhost
video fbdev: da8xx-fb: fix videomodes of lcd panels 2016-05-04 14:48:51 -07:00
virt
virtio
vlynq
vme
w1
watchdog
xen xen/evtchn: fix ring resize when binding new events 2016-05-11 11:21:15 +02:00
zorro
Kconfig
Makefile