]> Git Repo - linux.git/commitdiff
Merge tag 'pm-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
authorLinus Torvalds <[email protected]>
Wed, 18 Sep 2019 02:15:14 +0000 (19:15 -0700)
committerLinus Torvalds <[email protected]>
Wed, 18 Sep 2019 02:15:14 +0000 (19:15 -0700)
Pull power management updates from Rafael Wysocki:
 "These include a rework of the main suspend-to-idle code flow (related
  to the handling of spurious wakeups), a switch over of several users
  of cpufreq notifiers to QoS-based limits, a new devfreq driver for
  Tegra20, a new cpuidle driver and governor for virtualized guests, an
  extension of the wakeup sources framework to expose wakeup sources as
  device objects in sysfs, and more.

  Specifics:

   - Rework the main suspend-to-idle control flow to avoid repeating
     "noirq" device resume and suspend operations in case of spurious
     wakeups from the ACPI EC and decouple the ACPI EC wakeups support
     from the LPS0 _DSM support (Rafael Wysocki).

   - Extend the wakeup sources framework to expose wakeup sources as
     device objects in sysfs (Tri Vo, Stephen Boyd).

   - Expose system suspend statistics in sysfs (Kalesh Singh).

   - Introduce a new haltpoll cpuidle driver and a new matching governor
     for virtualized guests wanting to do guest-side polling in the idle
     loop (Marcelo Tosatti, Joao Martins, Wanpeng Li, Stephen Rothwell).

   - Fix the menu and teo cpuidle governors to allow the scheduler tick
     to be stopped if PM QoS is used to limit the CPU idle state exit
     latency in some cases (Rafael Wysocki).

   - Increase the resolution of the play_idle() argument to microseconds
     for more fine-grained injection of CPU idle cycles (Daniel
     Lezcano).

   - Switch over some users of cpuidle notifiers to the new QoS-based
     frequency limits and drop the CPUFREQ_ADJUST and CPUFREQ_NOTIFY
     policy notifier events (Viresh Kumar).

   - Add new cpufreq driver based on nvmem for sun50i (Yangtao Li).

   - Add support for MT8183 and MT8516 to the mediatek cpufreq driver
     (Andrew-sh.Cheng, Fabien Parent).

   - Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson
     Huang).

   - Add qcs404 to cpufreq-dt-platdev blacklist (Jorge Ramirez-Ortiz).

   - Update the qcom cpufreq driver (among other things, to make it
     easier to extend and to use kryo cpufreq for other nvmem-based
     SoCs) and add qcs404 support to it (Niklas Cassel, Douglas
     RAILLARD, Sibi Sankar, Sricharan R).

   - Fix assorted issues and make assorted minor improvements in the
     cpufreq code (Colin Ian King, Douglas RAILLARD, Florian Fainelli,
     Gustavo Silva, Hariprasad Kelam).

   - Add new devfreq driver for NVidia Tegra20 (Dmitry Osipenko, Arnd
     Bergmann).

   - Add new Exynos PPMU events to devfreq events and extend that
     mechanism (Lukasz Luba).

   - Fix and clean up the exynos-bus devfreq driver (Kamil Konieczny).

   - Improve devfreq documentation and governor code, fix spelling typos
     in devfreq (Ezequiel Garcia, Krzysztof Kozlowski, Leonard Crestez,
     MyungJoo Ham, Gaël PORTAY).

   - Add regulators enable and disable to the OPP (operating performance
     points) framework (Kamil Konieczny).

   - Update the OPP framework to support multiple opp-suspend properties
     (Anson Huang).

   - Fix assorted issues and make assorted minor improvements in the OPP
     code (Niklas Cassel, Viresh Kumar, Yue Hu).

   - Clean up the generic power domains (genpd) framework (Ulf Hansson).

   - Clean up assorted pieces of power management code and documentation
     (Akinobu Mita, Amit Kucheria, Chuhong Yuan).

   - Update the pm-graph tool to version 5.5 including multiple fixes
     and improvements (Todd Brandt).

   - Update the cpupower utility (Benjamin Weis, Geert Uytterhoeven,
     Sébastien Szymanski)"

* tag 'pm-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (126 commits)
  cpuidle-haltpoll: Enable kvm guest polling when dedicated physical CPUs are available
  cpuidle-haltpoll: do not set an owner to allow modunload
  cpuidle-haltpoll: return -ENODEV on modinit failure
  cpuidle-haltpoll: set haltpoll as preferred governor
  cpuidle: allow governor switch on cpuidle_register_driver()
  PM: runtime: Documentation: add runtime_status ABI document
  pm-graph: make setVal unbuffered again for python2 and python3
  powercap: idle_inject: Use higher resolution for idle injection
  cpuidle: play_idle: Increase the resolution to usec
  cpuidle-haltpoll: vcpu hotplug support
  cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist
  cpufreq: qcom: Add support for qcs404 on nvmem driver
  cpufreq: qcom: Refactor the driver to make it easier to extend
  cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs
  dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR
  dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain
  Documentation: cpufreq: Update policy notifier documentation
  cpufreq: Remove CPUFREQ_ADJUST and CPUFREQ_NOTIFY policy notifier events
  PM / Domains: Verify PM domain type in dev_pm_genpd_set_performance_state()
  PM / Domains: Simplify genpd_lookup_dev()
  ...

12 files changed:
1  2 
MAINTAINERS
arch/x86/Kconfig
arch/x86/kernel/kvm.c
drivers/base/arch_topology.c
drivers/cpufreq/intel_pstate.c
drivers/cpuidle/Makefile
include/linux/acpi.h
include/linux/cpuidle.h
include/linux/interrupt.h
kernel/sched/cpufreq_schedutil.c
kernel/sched/idle.c
kernel/time/alarmtimer.c

diff --combined MAINTAINERS
index 7e9a7125607987c0466e9768f46c9a34bb98dbd1,161c4dc9efd9eda323daf70a109bad598c76ec95..2ecc1de1910d1f1ee8361c530c3d066cbc3cb01e
@@@ -517,6 -517,14 +517,6 @@@ W:        http://ez.analog.com/community/linux
  S:    Supported
  F:    drivers/video/backlight/adp8860_bl.c
  
 -ADS1015 HARDWARE MONITOR DRIVER
 -M:    Dirk Eibach <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    Documentation/hwmon/ads1015.rst
 -F:    drivers/hwmon/ads1015.c
 -F:    include/linux/platform_data/ads1015.h
 -
  ADT746X FAN DRIVER
  M:    Colin Leroy <[email protected]>
  S:    Maintained
@@@ -658,7 -666,7 +658,7 @@@ ALI1563 I2C DRIVE
  M:    Rudolf Marek <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/busses/i2c-ali1563
 +F:    Documentation/i2c/busses/i2c-ali1563.rst
  F:    drivers/i2c/busses/i2c-ali1563.c
  
  ALLEGRO DVT VIDEO IP CORE DRIVER
@@@ -668,6 -676,13 +668,13 @@@ L:       [email protected]
  S:    Maintained
  F:    drivers/staging/media/allegro-dvt/
  
+ ALLWINNER CPUFREQ DRIVER
+ M:    Yangtao Li <[email protected]>
+ L:    [email protected]
+ S:    Maintained
+ F:    Documentation/devicetree/bindings/opp/sun50i-nvmem-cpufreq.txt
+ F:    drivers/cpufreq/sun50i-cpufreq-nvmem.c
  ALLWINNER SECURITY SYSTEM
  M:    Corentin Labbe <[email protected]>
  L:    [email protected]
@@@ -1342,7 -1357,8 +1349,7 @@@ M:      Will Deacon <[email protected]
  R:    Robin Murphy <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/iommu/arm-smmu.c
 -F:    drivers/iommu/arm-smmu-v3.c
 +F:    drivers/iommu/arm-smmu*
  F:    drivers/iommu/io-pgtable-arm.c
  F:    drivers/iommu/io-pgtable-arm-v7s.c
  
@@@ -1412,14 -1428,6 +1419,14 @@@ F:    drivers/pinctrl/sunxi
  F:    drivers/soc/sunxi/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
  
 +Allwinner A10 CSI driver
 +M:    Maxime Ripard <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +F:    drivers/media/platform/sunxi/sun4i-csi/
 +F:    Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
 +S:    Maintained
 +
  ARM/Amlogic Meson SoC CLOCK FRAMEWORK
  M:    Neil Armstrong <[email protected]>
  M:    Jerome Brunet <[email protected]>
@@@ -1470,7 -1478,6 +1477,7 @@@ F:      arch/arm/mach-artpe
  F:    arch/arm/boot/dts/artpec6*
  F:    drivers/clk/axis
  F:    drivers/crypto/axis
 +F:    drivers/mmc/host/usdhi6rol0.c
  F:    drivers/pinctrl/pinctrl-artpec*
  F:    Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
  
@@@ -1582,8 -1589,8 +1589,8 @@@ R:      Suzuki K Poulose <suzuki.poulose@arm
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/hwtracing/coresight/*
 -F:    Documentation/trace/coresight.txt
 -F:    Documentation/trace/coresight-cpu-debug.txt
 +F:    Documentation/trace/coresight.rst
 +F:    Documentation/trace/coresight-cpu-debug.rst
  F:    Documentation/devicetree/bindings/arm/coresight.txt
  F:    Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
@@@ -1626,21 -1633,6 +1633,21 @@@ F:    drivers/clocksource/timer-atlas7.
  N:    [^a-z]sirf
  X:    drivers/gnss
  
 +ARM/CZ.NIC TURRIS MOX SUPPORT
 +M:    Marek Behun <[email protected]>
 +W:    http://mox.turris.cz
 +S:    Maintained
 +F:    Documentation/ABI/testing/debugfs-moxtet
 +F:    Documentation/ABI/testing/sysfs-bus-moxtet-devices
 +F:    Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
 +F:    Documentation/devicetree/bindings/bus/moxtet.txt
 +F:    Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
 +F:    Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
 +F:    include/linux/moxtet.h
 +F:    drivers/bus/moxtet.c
 +F:    drivers/firmware/turris-mox-rwtm.c
 +F:    drivers/gpio/gpio-moxtet.c
 +
  ARM/EBSA110 MACHINE SUPPORT
  M:    Russell King <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-pxa/colibri-pxa270-income.c
  
 -ARM/INTEL IOP13XX ARM ARCHITECTURE
 -M:    Lennert Buytenhek <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Maintained
 -
  ARM/INTEL IOP32X ARM ARCHITECTURE
  M:    Lennert Buytenhek <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  
 -ARM/INTEL IOP33X ARM ARCHITECTURE
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Orphan
 -
  ARM/INTEL IQ81342EX MACHINE SUPPORT
  M:    Lennert Buytenhek <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -1927,6 -1928,12 +1934,6 @@@ S:     Maintaine
  F:    drivers/phy/mediatek/
  F:    Documentation/devicetree/bindings/phy/phy-mtk-*
  
 -ARM/MICREL KS8695 ARCHITECTURE
 -M:    Greg Ungerer <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -F:    arch/arm/mach-ks8695/
 -S:    Odd Fixes
 -
  ARM/Microchip (AT91) SoC support
  M:    Nicolas Ferre <[email protected]>
  M:    Alexandre Belloni <[email protected]>
@@@ -1968,7 -1975,6 +1975,7 @@@ F:      Documentation/devicetree/bindings/i2
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/mach-u300/
  F:    arch/arm/mach-ux500/
 +F:    drivers/soc/ux500/
  F:    arch/arm/boot/dts/ste-*
  F:    drivers/clk/clk-nomadik.c
  F:    drivers/clk/clk-u300.c
@@@ -2012,6 -2018,22 +2019,6 @@@ F:     drivers/*/*npcm
  F:    Documentation/devicetree/bindings/*/*npcm*
  F:    Documentation/devicetree/bindings/*/*/*npcm*
  
 -ARM/NUVOTON W90X900 ARM ARCHITECTURE
 -M:    Wan ZongShun <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -W:    http://www.mcuos.com
 -S:    Maintained
 -F:    arch/arm/mach-w90x900/
 -F:    drivers/input/keyboard/w90p910_keypad.c
 -F:    drivers/input/touchscreen/w90p910_ts.c
 -F:    drivers/watchdog/nuc900_wdt.c
 -F:    drivers/net/ethernet/nuvoton/w90p910_ether.c
 -F:    drivers/mtd/nand/raw/nuc900_nand.c
 -F:    drivers/rtc/rtc-nuc900.c
 -F:    drivers/spi/spi-nuc900.c
 -F:    drivers/usb/host/ehci-w90x900.c
 -F:    drivers/video/fbdev/nuc900fb.c
 -
  ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
  L:    [email protected] (subscribers-only)
  W:    http://wiki.openmoko.org/wiki/Neo_FreeRunner
@@@ -2204,9 -2226,8 +2211,9 @@@ F:      drivers/*/*s3c24
  F:    drivers/*/*/*s3c24*
  F:    drivers/*/*s3c64xx*
  F:    drivers/*/*s5pv210*
 -F:    drivers/memory/samsung/*
 -F:    drivers/soc/samsung/*
 +F:    drivers/memory/samsung/
 +F:    drivers/soc/samsung/
 +F:    include/linux/soc/samsung/
  F:    Documentation/arm/samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
  F:    Documentation/devicetree/bindings/sram/samsung-sram.txt
@@@ -4089,7 -4110,7 +4096,7 @@@ L:      [email protected] (mod
  W:    http://linux-cifs.samba.org/
  T:    git git://git.samba.org/sfrench/cifs-2.6.git
  S:    Supported
 -F:    Documentation/filesystems/cifs/
 +F:    Documentation/admin-guide/cifs/
  F:    fs/cifs/
  
  COMPACTPCI HOTPLUG CORE
@@@ -4276,14 -4297,6 +4283,14 @@@ S:    Supporte
  F:    drivers/cpuidle/cpuidle-exynos.c
  F:    arch/arm/mach-exynos/pm.c
  
 +CPUIDLE DRIVER - ARM PSCI
 +M:    Lorenzo Pieralisi <[email protected]>
 +M:    Sudeep Holla <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/cpuidle/cpuidle-psci.c
 +
  CPU IDLE TIME MANAGEMENT FRAMEWORK
  M:    "Rafael J. Wysocki" <[email protected]>
  M:    Daniel Lezcano <[email protected]>
@@@ -4945,9 -4958,7 +4952,9 @@@ M:      Jonathan Corbet <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/
 +F:    scripts/documentation-file-ref-check
  F:    scripts/kernel-doc
 +F:    scripts/sphinx-pre-install
  X:    Documentation/ABI/
  X:    Documentation/firmware-guide/acpi/
  X:    Documentation/devicetree/
  S:    Maintained
  F:    Documentation/translations/it_IT
  
 +DOCUMENTATION SCRIPTS
 +M:    Mauro Carvalho Chehab <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    scripts/documentation-file-ref-check
 +F:    scripts/sphinx-pre-install
 +F:    Documentation/sphinx/parse-headers.pl
 +
  DONGWOON DW9714 LENS VOICE COIL DRIVER
  M:    Sakari Ailus <[email protected]>
  L:    [email protected]
@@@ -5765,11 -5768,6 +5772,11 @@@ S:    Supporte
  F:    drivers/edac/aspeed_edac.c
  F:    Documentation/devicetree/bindings/edac/aspeed-sdram-edac.txt
  
 +EDAC-BLUEFIELD
 +M:    Shravan Kumar Ramani <[email protected]>
 +S:    Supported
 +F:    drivers/edac/bluefield_edac.c
 +
  EDAC-CALXEDA
  M:    Robert Richter <[email protected]>
  L:    [email protected]
@@@ -5794,11 -5792,10 +5801,11 @@@ F:   drivers/edac/thunderx_edac
  EDAC-CORE
  M:    Borislav Petkov <[email protected]>
  M:    Mauro Carvalho Chehab <[email protected]>
 +M:    Tony Luck <[email protected]>
  R:    James Morse <[email protected]>
 +R:    Robert Richter <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git linux_next
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
  S:    Supported
  F:    Documentation/admin-guide/ras.rst
  F:    Documentation/driver-api/edac.rst
@@@ -6278,14 -6275,12 +6285,14 @@@ S:   Maintaine
  F:    drivers/hwmon/f75375s.c
  F:    include/linux/f75375s.h
  
 -FIREWIRE AUDIO DRIVERS
 +FIREWIRE AUDIO DRIVERS and IEC 61883-1/6 PACKET STREAMING ENGINE
  M:    Clemens Ladisch <[email protected]>
 +M:    Takashi Sakamoto <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  S:    Maintained
  F:    sound/firewire/
 +F:    include/uapi/sound/firewire.h
  
  FIREWIRE MEDIA DRIVERS (firedtv)
  M:    Stefan Richter <[email protected]>
@@@ -6333,7 -6328,7 +6340,7 @@@ FLEXTIMER FTM-QUADDEC DRIVE
  M:    Patrick Havelange <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/ABI/testing/sysfs-bus-counter-ftm-quadddec
 +F:    Documentation/ABI/testing/sysfs-bus-counter-ftm-quaddec
  F:    Documentation/devicetree/bindings/counter/ftm-quaddec.txt
  F:    drivers/counter/ftm-quaddec.c
  
@@@ -6343,6 -6338,15 +6350,6 @@@ S:     Odd Fixe
  L:    [email protected]
  F:    drivers/block/floppy.c
  
 -FMC SUBSYSTEM
 -M:    Alessandro Rubini <[email protected]>
 -W:    http://www.ohwr.org/projects/fmc-bus
 -S:    Supported
 -F:    drivers/fmc/
 -F:    include/linux/fmc*.h
 -F:    include/linux/ipmi-fru.h
 -K:    fmc_d.*register
 -
  FPGA MANAGER FRAMEWORK
  M:    Moritz Fischer <[email protected]>
  L:    [email protected]
@@@ -6442,7 -6446,6 +6449,7 @@@ M:      Frank Li <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    drivers/perf/fsl_imx8_ddr_perf.c
 +F:    Documentation/admin-guide/perf/imx-ddr.rst
  F:    Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
  
  FREESCALE IMX I2C DRIVER
@@@ -6736,13 -6739,6 +6743,13 @@@ W:    https://linuxtv.or
  S:    Maintained
  F:    drivers/media/radio/radio-gemtek*
  
 +GENERIC ARCHITECTURE TOPOLOGY
 +M:    Sudeep Holla <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/base/arch_topology.c
 +F:    include/linux/arch_topology.h
 +
  GENERIC GPIO I2C DRIVER
  M:    Wolfram Sang <[email protected]>
  S:    Supported
@@@ -6755,7 -6751,7 +6762,7 @@@ L:      [email protected]
  S:    Supported
  F:    drivers/i2c/muxes/i2c-mux-gpio.c
  F:    include/linux/platform_data/i2c-mux-gpio.h
 -F:    Documentation/i2c/muxes/i2c-mux-gpio
 +F:    Documentation/i2c/muxes/i2c-mux-gpio.rst
  
  GENERIC HDLC (WAN) DRIVERS
  M:    Krzysztof Halasa <[email protected]>
@@@ -7504,14 -7500,14 +7511,14 @@@ I2C CONTROLLER DRIVER FOR NVIDIA GP
  M:    Ajay Gupta <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/busses/i2c-nvidia-gpu
 +F:    Documentation/i2c/busses/i2c-nvidia-gpu.rst
  F:    drivers/i2c/busses/i2c-nvidia-gpu.c
  
  I2C MUXES
  M:    Peter Rosin <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/i2c-topology
 +F:    Documentation/i2c/i2c-topology.rst
  F:    Documentation/i2c/muxes/
  F:    Documentation/devicetree/bindings/i2c/i2c-mux*
  F:    Documentation/devicetree/bindings/i2c/i2c-arb*
@@@ -7531,8 -7527,8 +7538,8 @@@ I2C OVER PARALLEL POR
  M:    Jean Delvare <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/busses/i2c-parport
 -F:    Documentation/i2c/busses/i2c-parport-light
 +F:    Documentation/i2c/busses/i2c-parport.rst
 +F:    Documentation/i2c/busses/i2c-parport-light.rst
  F:    drivers/i2c/busses/i2c-parport.c
  F:    drivers/i2c/busses/i2c-parport-light.c
  
@@@ -7566,7 -7562,7 +7573,7 @@@ I2C-TAOS-EVM DRIVE
  M:    Jean Delvare <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/busses/i2c-taos-evm
 +F:    Documentation/i2c/busses/i2c-taos-evm.rst
  F:    drivers/i2c/busses/i2c-taos-evm.c
  
  I2C-TINY-USB DRIVER
@@@ -7580,19 -7576,19 +7587,19 @@@ I2C/SMBUS CONTROLLER DRIVERS FOR P
  M:    Jean Delvare <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/i2c/busses/i2c-ali1535
 -F:    Documentation/i2c/busses/i2c-ali1563
 -F:    Documentation/i2c/busses/i2c-ali15x3
 -F:    Documentation/i2c/busses/i2c-amd756
 -F:    Documentation/i2c/busses/i2c-amd8111
 -F:    Documentation/i2c/busses/i2c-i801
 -F:    Documentation/i2c/busses/i2c-nforce2
 -F:    Documentation/i2c/busses/i2c-piix4
 -F:    Documentation/i2c/busses/i2c-sis5595
 -F:    Documentation/i2c/busses/i2c-sis630
 -F:    Documentation/i2c/busses/i2c-sis96x
 -F:    Documentation/i2c/busses/i2c-via
 -F:    Documentation/i2c/busses/i2c-viapro
 +F:    Documentation/i2c/busses/i2c-ali1535.rst
 +F:    Documentation/i2c/busses/i2c-ali1563.rst
 +F:    Documentation/i2c/busses/i2c-ali15x3.rst
 +F:    Documentation/i2c/busses/i2c-amd756.rst
 +F:    Documentation/i2c/busses/i2c-amd8111.rst
 +F:    Documentation/i2c/busses/i2c-i801.rst
 +F:    Documentation/i2c/busses/i2c-nforce2.rst
 +F:    Documentation/i2c/busses/i2c-piix4.rst
 +F:    Documentation/i2c/busses/i2c-sis5595.rst
 +F:    Documentation/i2c/busses/i2c-sis630.rst
 +F:    Documentation/i2c/busses/i2c-sis96x.rst
 +F:    Documentation/i2c/busses/i2c-via.rst
 +F:    Documentation/i2c/busses/i2c-viapro.rst
  F:    drivers/i2c/busses/i2c-ali1535.c
  F:    drivers/i2c/busses/i2c-ali1563.c
  F:    drivers/i2c/busses/i2c-ali15x3.c
@@@ -7621,7 -7617,7 +7628,7 @@@ M:      Seth Heasley <[email protected]
  M:    Neil Horman <[email protected]>
  L:    [email protected]
  F:    drivers/i2c/busses/i2c-ismt.c
 -F:    Documentation/i2c/busses/i2c-ismt
 +F:    Documentation/i2c/busses/i2c-ismt.rst
  
  I2C/SMBUS STUB DRIVER
  M:    Jean Delvare <[email protected]>
@@@ -8371,7 -8367,7 +8378,7 @@@ M:      [email protected]
  L:    [email protected] (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
 -F:    Documentation/wimax/README.i2400m
 +F:    Documentation/admin-guide/wimax/i2400m.rst
  F:    drivers/net/wimax/i2400m/
  F:    include/uapi/linux/wimax/i2400m.h
  
@@@ -8396,6 -8392,12 +8403,6 @@@ F:     Documentation/x86/intel_txt.rs
  F:    include/linux/tboot.h
  F:    arch/x86/kernel/tboot.c
  
 -INTEL-MID GPIO DRIVER
 -M:    David Cohen <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/gpio/gpio-intel-mid.c
 -
  INTERCONNECT API
  M:    Georgi Djakov <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/sgi/ioc3-eth.c
  
 -IOC3 SERIAL DRIVER
 -M:    Pat Gefre <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -F:    drivers/tty/serial/ioc3_serial.c
 -
  IOMAP FILESYSTEM LIBRARY
  M:    Christoph Hellwig <[email protected]>
  M:    Darrick J. Wong <[email protected]>
@@@ -8656,7 -8664,7 +8663,7 @@@ L:      [email protected]
  W:    http://jfs.sourceforge.net/
  T:    git git://github.com/kleikamp/linux-shaggy.git
  S:    Maintained
 -F:    Documentation/filesystems/jfs.txt
 +F:    Documentation/admin-guide/jfs.rst
  F:    fs/jfs/
  
  JME NETWORK DRIVER
@@@ -8932,7 -8940,7 +8939,7 @@@ F:      security/keys/encrypted-keys
  
  KEYS-TRUSTED
  M:    James Bottomley <[email protected]>
 -M:      Jarkko Sakkinen <[email protected]>
 +M:    Jarkko Sakkinen <[email protected]>
  M:    Mimi Zohar <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -8999,7 -9007,7 +9006,7 @@@ F:      kernel/kprobes.
  KS0108 LCD CONTROLLER DRIVER
  M:    Miguel Ojeda Sandonis <[email protected]>
  S:    Maintained
 -F:    Documentation/auxdisplay/ks0108
 +F:    Documentation/admin-guide/auxdisplay/ks0108.rst
  F:    drivers/auxdisplay/ks0108.c
  F:    include/linux/ks0108.h
  
@@@ -9346,7 -9354,7 +9353,7 @@@ F:      drivers/misc/lkdtm/
  
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <[email protected]>
 -M:    Andrea Parri <andrea.parri@amarulasolutions.com>
 +M:    Andrea Parri <parri.andrea@gmail.com>
  M:    Will Deacon <[email protected]>
  M:    Peter Zijlstra <[email protected]>
  M:    Boqun Feng <[email protected]>
@@@ -9354,7 -9362,7 +9361,7 @@@ M:      Nicholas Piggin <[email protected]
  M:    David Howells <[email protected]>
  M:    Jade Alglave <[email protected]>
  M:    Luc Maranget <[email protected]>
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  R:    Akira Yokosawa <[email protected]>
  R:    Daniel Lustig <[email protected]>
  L:    [email protected]
@@@ -9588,7 -9596,7 +9595,7 @@@ F:      Documentation/networking/mac80211-in
  F:    include/net/mac80211.h
  F:    net/mac80211/
  F:    drivers/net/wireless/mac80211_hwsim.[ch]
 -F:    Documentation/networking/mac80211_hwsim/README
 +F:    Documentation/networking/mac80211_hwsim/mac80211_hwsim.rst
  
  MAILBOX API
  M:    Jassi Brar <[email protected]>
  L:    [email protected]
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 -F:    Documentation/devicetree/bindings/media/renesas,rcar-csi2.txt
 -F:    Documentation/devicetree/bindings/media/rcar_vin.txt
 +F:    Documentation/devicetree/bindings/media/renesas,csi2.txt
 +F:    Documentation/devicetree/bindings/media/renesas,vin.txt
  F:    drivers/media/platform/rcar-vin/
  
  MEDIA DRIVERS FOR RENESAS - VSP1
  S:    Supported
  F:    drivers/i2c/busses/i2c-mlxcpld.c
  F:    drivers/i2c/muxes/i2c-mux-mlxcpld.c
 -F:    Documentation/i2c/busses/i2c-mlxcpld
 +F:    Documentation/i2c/busses/i2c-mlxcpld.rst
  
  MELLANOX MLXCPLD LED DRIVER
  M:    Vadim Pasternak <[email protected]>
@@@ -10383,7 -10391,7 +10390,7 @@@ F:   drivers/platform/x86/mlx-platform.
  
  MEMBARRIER SUPPORT
  M:    Mathieu Desnoyers <[email protected]>
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  L:    [email protected]
  S:    Supported
  F:    kernel/sched/membarrier.c
@@@ -10635,6 -10643,12 +10642,6 @@@ M:  Nicolas Ferre <nicolas.ferre@microch
  S:    Supported
  F:    drivers/power/reset/at91-sama5d2_shdwc.c
  
 -MICROCHIP SAMA5D2-COMPATIBLE PIOBU GPIO
 -M:    Andrei Stefanescu <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -L:    [email protected]
 -F:    drivers/gpio/gpio-sama5d2-piobu.c
 -
  MICROCHIP SPI DRIVER
  M:    Nicolas Ferre <[email protected]>
  S:    Supported
@@@ -10647,6 -10661,13 +10654,6 @@@ S:  Supporte
  F:    drivers/misc/atmel-ssc.c
  F:    include/linux/atmel-ssc.h
  
 -MICROCHIP TIMER COUNTER (TC) AND CLOCKSOURCE DRIVERS
 -M:    Nicolas Ferre <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Supported
 -F:    drivers/misc/atmel_tclib.c
 -F:    drivers/clocksource/tcb_clksrc.c
 -
  MICROCHIP USBA UDC DRIVER
  M:    Cristian Birsan <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -11854,21 -11875,6 +11861,21 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/i2c/ov5647.c
  
 +OMNIVISION OV5670 SENSOR DRIVER
 +M:    Chiranjeevi Rapolu <[email protected]>
 +M:    Hyungwoo Yang <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov5670.c
 +
 +OMNIVISION OV5675 SENSOR DRIVER
 +M:    Shawn Tu <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov5675.c
 +
  OMNIVISION OV5695 SENSOR DRIVER
  M:    Shunqian Zheng <[email protected]>
  L:    [email protected]
@@@ -11990,7 -11996,7 +11997,7 @@@ M:   Andrew Lunn <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/i2c/i2c-ocores.txt
 -F:    Documentation/i2c/busses/i2c-ocores
 +F:    Documentation/i2c/busses/i2c-ocores.rst
  F:    drivers/i2c/busses/i2c-ocores.c
  F:    include/linux/platform_data/i2c-ocores.h
  
  S:    Supported
  F:    lib/packing.c
  F:    include/linux/packing.h
 -F:    Documentation/packing.txt
 +F:    Documentation/core-api/packing.rst
  
  PADATA PARALLEL EXECUTION MECHANISM
  M:    Steffen Klassert <[email protected]>
@@@ -12614,7 -12620,6 +12621,7 @@@ PERFORMANCE EVENTS SUBSYSTE
  M:    Peter Zijlstra <[email protected]>
  M:    Ingo Molnar <[email protected]>
  M:    Arnaldo Carvalho de Melo <[email protected]>
 +R:    Mark Rutland <[email protected]>
  R:    Alexander Shishkin <[email protected]>
  R:    Jiri Olsa <[email protected]>
  R:    Namhyung Kim <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/pinctrl/pinctrl-at91*
 +F:    drivers/gpio/gpio-sama5d2-piobu.c
  
  PIN CONTROLLER - FREESCALE
  M:    Dong Aisheng <[email protected]>
@@@ -13311,8 -13315,8 +13318,8 @@@ QUALCOMM CPUFREQ DRIVER MSM8996/APQ809
  M:    Ilia Lin <[email protected]>
  L:    [email protected]
  S:    Maintained
- F:    Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
- F:    drivers/cpufreq/qcom-cpufreq-kryo.c
+ F:    Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
+ F:    drivers/cpufreq/qcom-cpufreq-nvmem.c
  
  QUALCOMM EMAC GIGABIT ETHERNET DRIVER
  M:    Timur Tabi <[email protected]>
@@@ -13502,7 -13506,7 +13509,7 @@@ S:   Orpha
  F:    drivers/net/wireless/ray*
  
  RCUTORTURE TEST FRAMEWORK
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Josh Triplett <[email protected]>
  R:    Steven Rostedt <[email protected]>
  R:    Mathieu Desnoyers <[email protected]>
@@@ -13549,7 -13553,7 +13556,7 @@@ F:   arch/x86/include/asm/resctrl_sched.
  F:    Documentation/x86/resctrl*
  
  READ-COPY UPDATE (RCU)
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Josh Triplett <[email protected]>
  R:    Steven Rostedt <[email protected]>
  R:    Mathieu Desnoyers <[email protected]>
@@@ -13707,7 -13711,7 +13714,7 @@@ F:   include/linux/reset-controller.
  RESTARTABLE SEQUENCES SUPPORT
  M:    Mathieu Desnoyers <[email protected]>
  M:    Peter Zijlstra <[email protected]>
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Boqun Feng <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -13770,8 -13774,7 +13777,8 @@@ F:   include/linux/hid-roccat
  F:    Documentation/ABI/*/sysfs-driver-hid-roccat*
  
  ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
 -M:    Jacob chen <[email protected]>
 +M:    Jacob Chen <[email protected]>
 +M:    Ezequiel Garcia <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/media/platform/rockchip/rga/
@@@ -13781,7 -13784,7 +13788,7 @@@ HANTRO VPU CODEC DRIVE
  M:    Ezequiel Garcia <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/staging/media/platform/hantro/
 +F:    drivers/staging/media/hantro/
  F:    Documentation/devicetree/bindings/media/rockchip-vpu.txt
  
  ROCKER DRIVER
@@@ -14139,8 -14142,6 +14146,8 @@@ M:   Kamil Konieczny <k.konieczny@partner
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/devicetree/bindings/crypto/samsung-slimsss.txt
 +F:    Documentation/devicetree/bindings/crypto/samsung-sss.txt
  F:    drivers/crypto/s5p-sss.c
  
  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
@@@ -14161,8 -14162,6 +14168,8 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    drivers/clk/samsung/
  F:    include/dt-bindings/clock/exynos*.h
  F:    Documentation/devicetree/bindings/clock/exynos*.txt
 +F:    Documentation/devicetree/bindings/clock/samsung,s3c*
 +F:    Documentation/devicetree/bindings/clock/samsung,s5p*
  
  SAMSUNG SPI DRIVERS
  M:    Kukjin Kim <[email protected]>
@@@ -14213,12 -14212,6 +14220,12 @@@ F: drivers/watchdog/sc1200wdt.
  SCHEDULER
  M:    Ingo Molnar <[email protected]>
  M:    Peter Zijlstra <[email protected]>
 +M:    Juri Lelli <[email protected]> (SCHED_DEADLINE)
 +M:    Vincent Guittot <[email protected]> (SCHED_NORMAL)
 +R:    Dietmar Eggemann <[email protected]> (SCHED_NORMAL)
 +R:    Steven Rostedt <[email protected]> (SCHED_FIFO/SCHED_RR)
 +R:    Ben Segall <[email protected]> (CONFIG_CFS_BANDWIDTH)
 +R:    Mel Gorman <[email protected]> (CONFIG_NUMA_BALANCING)
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
  S:    Maintained
@@@ -14313,7 -14306,7 +14320,7 @@@ F:   net/sctp
  SCx200 CPU SUPPORT
  M:    Jim Cromie <[email protected]>
  S:    Odd Fixes
 -F:    Documentation/i2c/busses/scx200_acb
 +F:    Documentation/i2c/busses/scx200_acb.rst
  F:    arch/x86/platform/scx200/
  F:    drivers/watchdog/scx200_wdt.c
  F:    drivers/i2c/busses/scx200*
@@@ -14754,7 -14747,7 +14761,7 @@@ F:   mm/sl?b
  
  SLEEPABLE READ-COPY UPDATE (SRCU)
  M:    Lai Jiangshan <[email protected]>
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Josh Triplett <[email protected]>
  R:    Steven Rostedt <[email protected]>
  R:    Mathieu Desnoyers <[email protected]>
@@@ -15532,7 -15525,7 +15539,7 @@@ F:   Documentation/devicetree/bindings/gp
  SYNOPSYS DESIGNWARE AXI DMAC DRIVER
  M:    Eugeniy Paltsev <[email protected]>
  S:    Maintained
 -F:    drivers/dma/dwi-axi-dmac/
 +F:    drivers/dma/dw-axi-dmac/
  F:    Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.txt
  
  SYNOPSYS DESIGNWARE DMAC DRIVER
@@@ -15589,7 -15582,6 +15596,7 @@@ F:   drivers/clk/clk-sc[mp]i.
  F:    drivers/cpufreq/sc[mp]i-cpufreq.c
  F:    drivers/firmware/arm_scpi.c
  F:    drivers/firmware/arm_scmi/
 +F:    drivers/reset/reset-scmi.c
  F:    include/linux/sc[mp]i_protocol.h
  
  SYSTEM RESET/SHUTDOWN DRIVERS
@@@ -15898,7 -15890,6 +15905,7 @@@ F:   drivers/firmware/ti_sci
  F:    include/linux/soc/ti/ti_sci_protocol.h
  F:    Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
  F:    drivers/soc/ti/ti_sci_pm_domains.c
 +F:    include/dt-bindings/soc/ti,sci_pm_domain.h
  F:    Documentation/devicetree/bindings/reset/ti,sci-reset.txt
  F:    Documentation/devicetree/bindings/clock/ti,sci-clk.txt
  F:    drivers/clk/keystone/sci-clk.c
@@@ -15952,7 -15943,7 +15959,7 @@@ M:   Viresh Kumar <[email protected]
  M:    Javi Merino <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    Documentation/thermal/cpu-cooling-api.rst
 +F:    Documentation/driver-api/thermal/cpu-cooling-api.rst
  F:    drivers/thermal/cpu_cooling.c
  F:    include/linux/cpu_cooling.h
  
@@@ -16253,7 -16244,7 +16260,7 @@@ F:   drivers/platform/x86/topstar-laptop.
  
  TORTURE-TEST MODULES
  M:    Davidlohr Bueso <[email protected]>
 -M:    "Paul E. McKenney" <paulmck@linux.ibm.com>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Josh Triplett <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -16475,7 -16466,7 +16482,7 @@@ F:   drivers/hid/hid-udraw-ps3.
  UFS FILESYSTEM
  M:    Evgeniy Dushistov <[email protected]>
  S:    Maintained
 -F:    Documentation/filesystems/ufs.txt
 +F:    Documentation/admin-guide/ufs.rst
  F:    fs/ufs/
  
  UHID USERSPACE HID IO DRIVER:
@@@ -17230,7 -17221,6 +17237,7 @@@ M:   "VMware, Inc." <[email protected]
  L:    [email protected]
  S:    Supported
  F:    arch/x86/kernel/cpu/vmware.c
 +F:    arch/x86/include/asm/vmware.h
  
  VMWARE PVRDMA DRIVER
  M:    Adit Ranadive <[email protected]>
@@@ -17280,7 -17270,6 +17287,7 @@@ F:   Documentation/power/regulator
  F:    drivers/regulator/
  F:    include/dt-bindings/regulator/
  F:    include/linux/regulator/
 +K:    regulator_get_optional
  
  VRF
  M:    David Ahern <[email protected]>
  L:    [email protected] (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
 -F:    Documentation/wimax/README.wimax
 +F:    Documentation/admin-guide/wimax/wimax.rst
  F:    include/linux/wimax/debug.h
  F:    include/net/wimax.h
  F:    include/uapi/linux/wimax.h
@@@ -17549,7 -17538,7 +17556,7 @@@ M:   Darren Hart <[email protected]
  M:    Andy Shevchenko <[email protected]>
  L:    [email protected]
  T:    git git://git.infradead.org/linux-platform-drivers-x86.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/platform/x86/
  F:    drivers/platform/olpc/
  
@@@ -17717,7 -17706,8 +17724,7 @@@ F:   include/uapi/linux/dqblk_xfs.
  F:    include/uapi/linux/fsmap.h
  
  XILINX AXI ETHERNET DRIVER
 -M:    Anirudha Sarangi <[email protected]>
 -M:    John Linn <[email protected]>
 +M:    Radhey Shyam Pandey <[email protected]>
  S:    Maintained
  F:    drivers/net/ethernet/xilinx/xilinx_axienet*
  
@@@ -17846,6 -17836,14 +17853,6 @@@ S:  Maintaine
  F:    mm/zpool.c
  F:    include/linux/zpool.h
  
 -ZR36067 VIDEO FOR LINUX DRIVER
 -L:    [email protected]
 -L:    [email protected]
 -W:    http://mjpeg.sourceforge.net/driver-zoran/
 -T:    hg https://linuxtv.org/hg/v4l-dvb
 -S:    Odd Fixes
 -F:    drivers/staging/media/zoran/
 -
  ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
  M:    Minchan Kim <[email protected]>
  M:    Nitin Gupta <[email protected]>
diff --combined arch/x86/Kconfig
index 58eae28c3dd618d2c58e5f1adb9a93b07e1e6425,05e78acb187c726cd77dc0b979fe84f0aae32d4c..4195f44c6a0955ef50c5eed87502b4a4c595d6d7
@@@ -794,6 -794,7 +794,7 @@@ config KVM_GUES
        bool "KVM Guest support (including kvmclock)"
        depends on PARAVIRT
        select PARAVIRT_CLOCK
+       select ARCH_CPUIDLE_HALTPOLL
        default y
        ---help---
          This option enables various optimizations for running under the KVM
          underlying device model, the host provides the guest with
          timing infrastructure such as time of day, and system time
  
+ config ARCH_CPUIDLE_HALTPOLL
+         def_bool n
+         prompt "Disable host haltpoll when loading haltpoll driver"
+         help
+         If virtualized under KVM, disable host haltpoll.
  config PVH
        bool "Support for running PVH guests"
        ---help---
@@@ -1503,7 -1510,7 +1510,7 @@@ config X86_5LEVE
  
  config X86_DIRECT_GBPAGES
        def_bool y
 -      depends on X86_64 && !DEBUG_PAGEALLOC
 +      depends on X86_64
        ---help---
          Certain kernel features effectively disable kernel
          linear 1 GB mappings (even if the CPU otherwise
diff --combined arch/x86/kernel/kvm.c
index 4cc967178bf952ca32b01059505b588c3439db1d,98dafc1ea33d7f0fe8101995626691fcf35099f6..b2f56602af65baa27e6d7788ed14f5acc589b229
@@@ -311,7 -311,7 +311,7 @@@ static void kvm_guest_cpu_init(void
        if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF) && kvmapf) {
                u64 pa = slow_virt_to_phys(this_cpu_ptr(&apf_reason));
  
 -#ifdef CONFIG_PREEMPT
 +#ifdef CONFIG_PREEMPTION
                pa |= KVM_ASYNC_PF_SEND_ALWAYS;
  #endif
                pa |= KVM_ASYNC_PF_ENABLED;
@@@ -705,6 -705,7 +705,7 @@@ unsigned int kvm_arch_para_hints(void
  {
        return cpuid_edx(kvm_cpuid_base() | KVM_CPUID_FEATURES);
  }
+ EXPORT_SYMBOL_GPL(kvm_arch_para_hints);
  
  static uint32_t __init kvm_detect(void)
  {
@@@ -867,3 -868,39 +868,39 @@@ void __init kvm_spinlock_init(void
  }
  
  #endif        /* CONFIG_PARAVIRT_SPINLOCKS */
+ #ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL
+ static void kvm_disable_host_haltpoll(void *i)
+ {
+       wrmsrl(MSR_KVM_POLL_CONTROL, 0);
+ }
+ static void kvm_enable_host_haltpoll(void *i)
+ {
+       wrmsrl(MSR_KVM_POLL_CONTROL, 1);
+ }
+ void arch_haltpoll_enable(unsigned int cpu)
+ {
+       if (!kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL)) {
+               pr_err_once("kvm: host does not support poll control\n");
+               pr_err_once("kvm: host upgrade recommended\n");
+               return;
+       }
+       /* Enable guest halt poll disables host halt poll */
+       smp_call_function_single(cpu, kvm_disable_host_haltpoll, NULL, 1);
+ }
+ EXPORT_SYMBOL_GPL(arch_haltpoll_enable);
+ void arch_haltpoll_disable(unsigned int cpu)
+ {
+       if (!kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL))
+               return;
+       /* Enable guest halt poll disables host halt poll */
+       smp_call_function_single(cpu, kvm_enable_host_haltpoll, NULL, 1);
+ }
+ EXPORT_SYMBOL_GPL(arch_haltpoll_disable);
+ #endif
index b54d241a2ff56c7776b2e9854b44015381f4b22d,8cab1f5a8e0c8068a2de4d6c1d80f5040337e478..1eb81f113786f3875d590ca4941e5eef7e14bb51
  #include <linux/string.h>
  #include <linux/sched/topology.h>
  #include <linux/cpuset.h>
 +#include <linux/cpumask.h>
 +#include <linux/init.h>
 +#include <linux/percpu.h>
 +#include <linux/sched.h>
 +#include <linux/smp.h>
  
  DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE;
  
@@@ -179,7 -174,7 +179,7 @@@ init_cpu_capacity_callback(struct notif
        if (!raw_capacity)
                return 0;
  
-       if (val != CPUFREQ_NOTIFY)
+       if (val != CPUFREQ_CREATE_POLICY)
                return 0;
  
        pr_debug("cpu_capacity: init cpu capacity for CPUs [%*pbl] (to_visit=%*pbl)\n",
@@@ -246,296 -241,3 +246,296 @@@ static void parsing_done_workfn(struct 
  #else
  core_initcall(free_raw_capacity);
  #endif
 +
 +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
 +static int __init get_cpu_for_node(struct device_node *node)
 +{
 +      struct device_node *cpu_node;
 +      int cpu;
 +
 +      cpu_node = of_parse_phandle(node, "cpu", 0);
 +      if (!cpu_node)
 +              return -1;
 +
 +      cpu = of_cpu_node_to_id(cpu_node);
 +      if (cpu >= 0)
 +              topology_parse_cpu_capacity(cpu_node, cpu);
 +      else
 +              pr_crit("Unable to find CPU node for %pOF\n", cpu_node);
 +
 +      of_node_put(cpu_node);
 +      return cpu;
 +}
 +
 +static int __init parse_core(struct device_node *core, int package_id,
 +                           int core_id)
 +{
 +      char name[10];
 +      bool leaf = true;
 +      int i = 0;
 +      int cpu;
 +      struct device_node *t;
 +
 +      do {
 +              snprintf(name, sizeof(name), "thread%d", i);
 +              t = of_get_child_by_name(core, name);
 +              if (t) {
 +                      leaf = false;
 +                      cpu = get_cpu_for_node(t);
 +                      if (cpu >= 0) {
 +                              cpu_topology[cpu].package_id = package_id;
 +                              cpu_topology[cpu].core_id = core_id;
 +                              cpu_topology[cpu].thread_id = i;
 +                      } else {
 +                              pr_err("%pOF: Can't get CPU for thread\n",
 +                                     t);
 +                              of_node_put(t);
 +                              return -EINVAL;
 +                      }
 +                      of_node_put(t);
 +              }
 +              i++;
 +      } while (t);
 +
 +      cpu = get_cpu_for_node(core);
 +      if (cpu >= 0) {
 +              if (!leaf) {
 +                      pr_err("%pOF: Core has both threads and CPU\n",
 +                             core);
 +                      return -EINVAL;
 +              }
 +
 +              cpu_topology[cpu].package_id = package_id;
 +              cpu_topology[cpu].core_id = core_id;
 +      } else if (leaf) {
 +              pr_err("%pOF: Can't get CPU for leaf core\n", core);
 +              return -EINVAL;
 +      }
 +
 +      return 0;
 +}
 +
 +static int __init parse_cluster(struct device_node *cluster, int depth)
 +{
 +      char name[10];
 +      bool leaf = true;
 +      bool has_cores = false;
 +      struct device_node *c;
 +      static int package_id __initdata;
 +      int core_id = 0;
 +      int i, ret;
 +
 +      /*
 +       * First check for child clusters; we currently ignore any
 +       * information about the nesting of clusters and present the
 +       * scheduler with a flat list of them.
 +       */
 +      i = 0;
 +      do {
 +              snprintf(name, sizeof(name), "cluster%d", i);
 +              c = of_get_child_by_name(cluster, name);
 +              if (c) {
 +                      leaf = false;
 +                      ret = parse_cluster(c, depth + 1);
 +                      of_node_put(c);
 +                      if (ret != 0)
 +                              return ret;
 +              }
 +              i++;
 +      } while (c);
 +
 +      /* Now check for cores */
 +      i = 0;
 +      do {
 +              snprintf(name, sizeof(name), "core%d", i);
 +              c = of_get_child_by_name(cluster, name);
 +              if (c) {
 +                      has_cores = true;
 +
 +                      if (depth == 0) {
 +                              pr_err("%pOF: cpu-map children should be clusters\n",
 +                                     c);
 +                              of_node_put(c);
 +                              return -EINVAL;
 +                      }
 +
 +                      if (leaf) {
 +                              ret = parse_core(c, package_id, core_id++);
 +                      } else {
 +                              pr_err("%pOF: Non-leaf cluster with core %s\n",
 +                                     cluster, name);
 +                              ret = -EINVAL;
 +                      }
 +
 +                      of_node_put(c);
 +                      if (ret != 0)
 +                              return ret;
 +              }
 +              i++;
 +      } while (c);
 +
 +      if (leaf && !has_cores)
 +              pr_warn("%pOF: empty cluster\n", cluster);
 +
 +      if (leaf)
 +              package_id++;
 +
 +      return 0;
 +}
 +
 +static int __init parse_dt_topology(void)
 +{
 +      struct device_node *cn, *map;
 +      int ret = 0;
 +      int cpu;
 +
 +      cn = of_find_node_by_path("/cpus");
 +      if (!cn) {
 +              pr_err("No CPU information found in DT\n");
 +              return 0;
 +      }
 +
 +      /*
 +       * When topology is provided cpu-map is essentially a root
 +       * cluster with restricted subnodes.
 +       */
 +      map = of_get_child_by_name(cn, "cpu-map");
 +      if (!map)
 +              goto out;
 +
 +      ret = parse_cluster(map, 0);
 +      if (ret != 0)
 +              goto out_map;
 +
 +      topology_normalize_cpu_scale();
 +
 +      /*
 +       * Check that all cores are in the topology; the SMP code will
 +       * only mark cores described in the DT as possible.
 +       */
 +      for_each_possible_cpu(cpu)
 +              if (cpu_topology[cpu].package_id == -1)
 +                      ret = -EINVAL;
 +
 +out_map:
 +      of_node_put(map);
 +out:
 +      of_node_put(cn);
 +      return ret;
 +}
 +#endif
 +
 +/*
 + * cpu topology table
 + */
 +struct cpu_topology cpu_topology[NR_CPUS];
 +EXPORT_SYMBOL_GPL(cpu_topology);
 +
 +const struct cpumask *cpu_coregroup_mask(int cpu)
 +{
 +      const cpumask_t *core_mask = cpumask_of_node(cpu_to_node(cpu));
 +
 +      /* Find the smaller of NUMA, core or LLC siblings */
 +      if (cpumask_subset(&cpu_topology[cpu].core_sibling, core_mask)) {
 +              /* not numa in package, lets use the package siblings */
 +              core_mask = &cpu_topology[cpu].core_sibling;
 +      }
 +      if (cpu_topology[cpu].llc_id != -1) {
 +              if (cpumask_subset(&cpu_topology[cpu].llc_sibling, core_mask))
 +                      core_mask = &cpu_topology[cpu].llc_sibling;
 +      }
 +
 +      return core_mask;
 +}
 +
 +void update_siblings_masks(unsigned int cpuid)
 +{
 +      struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
 +      int cpu;
 +
 +      /* update core and thread sibling masks */
 +      for_each_online_cpu(cpu) {
 +              cpu_topo = &cpu_topology[cpu];
 +
 +              if (cpuid_topo->llc_id == cpu_topo->llc_id) {
 +                      cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling);
 +                      cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling);
 +              }
 +
 +              if (cpuid_topo->package_id != cpu_topo->package_id)
 +                      continue;
 +
 +              cpumask_set_cpu(cpuid, &cpu_topo->core_sibling);
 +              cpumask_set_cpu(cpu, &cpuid_topo->core_sibling);
 +
 +              if (cpuid_topo->core_id != cpu_topo->core_id)
 +                      continue;
 +
 +              cpumask_set_cpu(cpuid, &cpu_topo->thread_sibling);
 +              cpumask_set_cpu(cpu, &cpuid_topo->thread_sibling);
 +      }
 +}
 +
 +static void clear_cpu_topology(int cpu)
 +{
 +      struct cpu_topology *cpu_topo = &cpu_topology[cpu];
 +
 +      cpumask_clear(&cpu_topo->llc_sibling);
 +      cpumask_set_cpu(cpu, &cpu_topo->llc_sibling);
 +
 +      cpumask_clear(&cpu_topo->core_sibling);
 +      cpumask_set_cpu(cpu, &cpu_topo->core_sibling);
 +      cpumask_clear(&cpu_topo->thread_sibling);
 +      cpumask_set_cpu(cpu, &cpu_topo->thread_sibling);
 +}
 +
 +void __init reset_cpu_topology(void)
 +{
 +      unsigned int cpu;
 +
 +      for_each_possible_cpu(cpu) {
 +              struct cpu_topology *cpu_topo = &cpu_topology[cpu];
 +
 +              cpu_topo->thread_id = -1;
 +              cpu_topo->core_id = -1;
 +              cpu_topo->package_id = -1;
 +              cpu_topo->llc_id = -1;
 +
 +              clear_cpu_topology(cpu);
 +      }
 +}
 +
 +void remove_cpu_topology(unsigned int cpu)
 +{
 +      int sibling;
 +
 +      for_each_cpu(sibling, topology_core_cpumask(cpu))
 +              cpumask_clear_cpu(cpu, topology_core_cpumask(sibling));
 +      for_each_cpu(sibling, topology_sibling_cpumask(cpu))
 +              cpumask_clear_cpu(cpu, topology_sibling_cpumask(sibling));
 +      for_each_cpu(sibling, topology_llc_cpumask(cpu))
 +              cpumask_clear_cpu(cpu, topology_llc_cpumask(sibling));
 +
 +      clear_cpu_topology(cpu);
 +}
 +
 +__weak int __init parse_acpi_topology(void)
 +{
 +      return 0;
 +}
 +
 +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
 +void __init init_cpu_topology(void)
 +{
 +      reset_cpu_topology();
 +
 +      /*
 +       * Discard anything that was parsed if we hit an error so we
 +       * don't use partial information.
 +       */
 +      if (parse_acpi_topology())
 +              reset_cpu_topology();
 +      else if (of_have_populated_dt() && parse_dt_topology())
 +              reset_cpu_topology();
 +}
 +#endif
index 886324041add7b8de8ea871cbaabb8797b6315ae,32f27563613bfdeac316a137ab856f136c7c7aee..9f02de9a1b4743ea7d01c2a3ff9f85e0cb81a997
@@@ -24,6 -24,7 +24,7 @@@
  #include <linux/fs.h>
  #include <linux/acpi.h>
  #include <linux/vmalloc.h>
+ #include <linux/pm_qos.h>
  #include <trace/events/power.h>
  
  #include <asm/div64.h>
@@@ -1085,6 -1086,47 +1086,47 @@@ static ssize_t store_no_turbo(struct ko
        return count;
  }
  
+ static struct cpufreq_driver intel_pstate;
+ static void update_qos_request(enum dev_pm_qos_req_type type)
+ {
+       int max_state, turbo_max, freq, i, perf_pct;
+       struct dev_pm_qos_request *req;
+       struct cpufreq_policy *policy;
+       for_each_possible_cpu(i) {
+               struct cpudata *cpu = all_cpu_data[i];
+               policy = cpufreq_cpu_get(i);
+               if (!policy)
+                       continue;
+               req = policy->driver_data;
+               cpufreq_cpu_put(policy);
+               if (!req)
+                       continue;
+               if (hwp_active)
+                       intel_pstate_get_hwp_max(i, &turbo_max, &max_state);
+               else
+                       turbo_max = cpu->pstate.turbo_pstate;
+               if (type == DEV_PM_QOS_MIN_FREQUENCY) {
+                       perf_pct = global.min_perf_pct;
+               } else {
+                       req++;
+                       perf_pct = global.max_perf_pct;
+               }
+               freq = DIV_ROUND_UP(turbo_max * perf_pct, 100);
+               freq *= cpu->pstate.scaling;
+               if (dev_pm_qos_update_request(req, freq) < 0)
+                       pr_warn("Failed to update freq constraint: CPU%d\n", i);
+       }
+ }
  static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
                                  const char *buf, size_t count)
  {
  
        mutex_unlock(&intel_pstate_limits_lock);
  
-       intel_pstate_update_policies();
+       if (intel_pstate_driver == &intel_pstate)
+               intel_pstate_update_policies();
+       else
+               update_qos_request(DEV_PM_QOS_MAX_FREQUENCY);
  
        mutex_unlock(&intel_pstate_driver_lock);
  
@@@ -1139,7 -1184,10 +1184,10 @@@ static ssize_t store_min_perf_pct(struc
  
        mutex_unlock(&intel_pstate_limits_lock);
  
-       intel_pstate_update_policies();
+       if (intel_pstate_driver == &intel_pstate)
+               intel_pstate_update_policies();
+       else
+               update_qos_request(DEV_PM_QOS_MIN_FREQUENCY);
  
        mutex_unlock(&intel_pstate_driver_lock);
  
@@@ -1867,22 -1915,22 +1915,22 @@@ static const struct pstate_funcs knl_fu
                        (unsigned long)&policy }
  
  static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
 -      ICPU(INTEL_FAM6_SANDYBRIDGE,            core_funcs),
 +      ICPU(INTEL_FAM6_SANDYBRIDGE,            core_funcs),
        ICPU(INTEL_FAM6_SANDYBRIDGE_X,          core_funcs),
        ICPU(INTEL_FAM6_ATOM_SILVERMONT,        silvermont_funcs),
        ICPU(INTEL_FAM6_IVYBRIDGE,              core_funcs),
 -      ICPU(INTEL_FAM6_HASWELL_CORE,           core_funcs),
 -      ICPU(INTEL_FAM6_BROADWELL_CORE,         core_funcs),
 +      ICPU(INTEL_FAM6_HASWELL,                core_funcs),
 +      ICPU(INTEL_FAM6_BROADWELL,              core_funcs),
        ICPU(INTEL_FAM6_IVYBRIDGE_X,            core_funcs),
        ICPU(INTEL_FAM6_HASWELL_X,              core_funcs),
 -      ICPU(INTEL_FAM6_HASWELL_ULT,            core_funcs),
 -      ICPU(INTEL_FAM6_HASWELL_GT3E,           core_funcs),
 -      ICPU(INTEL_FAM6_BROADWELL_GT3E,         core_funcs),
 +      ICPU(INTEL_FAM6_HASWELL_L,              core_funcs),
 +      ICPU(INTEL_FAM6_HASWELL_G,              core_funcs),
 +      ICPU(INTEL_FAM6_BROADWELL_G,            core_funcs),
        ICPU(INTEL_FAM6_ATOM_AIRMONT,           airmont_funcs),
 -      ICPU(INTEL_FAM6_SKYLAKE_MOBILE,         core_funcs),
 +      ICPU(INTEL_FAM6_SKYLAKE_L,              core_funcs),
        ICPU(INTEL_FAM6_BROADWELL_X,            core_funcs),
 -      ICPU(INTEL_FAM6_SKYLAKE_DESKTOP,        core_funcs),
 -      ICPU(INTEL_FAM6_BROADWELL_XEON_D,       core_funcs),
 +      ICPU(INTEL_FAM6_SKYLAKE,                core_funcs),
 +      ICPU(INTEL_FAM6_BROADWELL_D,            core_funcs),
        ICPU(INTEL_FAM6_XEON_PHI_KNL,           knl_funcs),
        ICPU(INTEL_FAM6_XEON_PHI_KNM,           knl_funcs),
        ICPU(INTEL_FAM6_ATOM_GOLDMONT,          core_funcs),
  MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
  
  static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
 -      ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_funcs),
 +      ICPU(INTEL_FAM6_BROADWELL_D, core_funcs),
        ICPU(INTEL_FAM6_BROADWELL_X, core_funcs),
        ICPU(INTEL_FAM6_SKYLAKE_X, core_funcs),
        {}
  };
  
  static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = {
 -      ICPU(INTEL_FAM6_KABYLAKE_DESKTOP, core_funcs),
 +      ICPU(INTEL_FAM6_KABYLAKE, core_funcs),
        {}
  };
  
  static const struct x86_cpu_id intel_pstate_hwp_boost_ids[] = {
        ICPU(INTEL_FAM6_SKYLAKE_X, core_funcs),
 -      ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_funcs),
 +      ICPU(INTEL_FAM6_SKYLAKE, core_funcs),
        {}
  };
  
@@@ -2332,8 -2380,16 +2380,16 @@@ static unsigned int intel_cpufreq_fast_
  
  static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
  {
-       int ret = __intel_pstate_cpu_init(policy);
+       int max_state, turbo_max, min_freq, max_freq, ret;
+       struct dev_pm_qos_request *req;
+       struct cpudata *cpu;
+       struct device *dev;
+       dev = get_cpu_device(policy->cpu);
+       if (!dev)
+               return -ENODEV;
  
+       ret = __intel_pstate_cpu_init(policy);
        if (ret)
                return ret;
  
        /* This reflects the intel_pstate_get_cpu_pstates() setting. */
        policy->cur = policy->cpuinfo.min_freq;
  
+       req = kcalloc(2, sizeof(*req), GFP_KERNEL);
+       if (!req) {
+               ret = -ENOMEM;
+               goto pstate_exit;
+       }
+       cpu = all_cpu_data[policy->cpu];
+       if (hwp_active)
+               intel_pstate_get_hwp_max(policy->cpu, &turbo_max, &max_state);
+       else
+               turbo_max = cpu->pstate.turbo_pstate;
+       min_freq = DIV_ROUND_UP(turbo_max * global.min_perf_pct, 100);
+       min_freq *= cpu->pstate.scaling;
+       max_freq = DIV_ROUND_UP(turbo_max * global.max_perf_pct, 100);
+       max_freq *= cpu->pstate.scaling;
+       ret = dev_pm_qos_add_request(dev, req, DEV_PM_QOS_MIN_FREQUENCY,
+                                    min_freq);
+       if (ret < 0) {
+               dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret);
+               goto free_req;
+       }
+       ret = dev_pm_qos_add_request(dev, req + 1, DEV_PM_QOS_MAX_FREQUENCY,
+                                    max_freq);
+       if (ret < 0) {
+               dev_err(dev, "Failed to add max-freq constraint (%d)\n", ret);
+               goto remove_min_req;
+       }
+       policy->driver_data = req;
        return 0;
+ remove_min_req:
+       dev_pm_qos_remove_request(req);
+ free_req:
+       kfree(req);
+ pstate_exit:
+       intel_pstate_exit_perf_limits(policy);
+       return ret;
+ }
+ static int intel_cpufreq_cpu_exit(struct cpufreq_policy *policy)
+ {
+       struct dev_pm_qos_request *req;
+       req = policy->driver_data;
+       dev_pm_qos_remove_request(req + 1);
+       dev_pm_qos_remove_request(req);
+       kfree(req);
+       return intel_pstate_cpu_exit(policy);
  }
  
  static struct cpufreq_driver intel_cpufreq = {
        .target         = intel_cpufreq_target,
        .fast_switch    = intel_cpufreq_fast_switch,
        .init           = intel_cpufreq_cpu_init,
-       .exit           = intel_pstate_cpu_exit,
+       .exit           = intel_cpufreq_cpu_exit,
        .stop_cpu       = intel_cpufreq_stop_cpu,
        .update_limits  = intel_pstate_update_limits,
        .name           = "intel_cpufreq",
@@@ -2624,7 -2736,7 +2736,7 @@@ static inline void intel_pstate_request
  
  static const struct x86_cpu_id hwp_support_ids[] __initconst = {
        ICPU_HWP(INTEL_FAM6_BROADWELL_X, INTEL_PSTATE_HWP_BROADWELL),
 -      ICPU_HWP(INTEL_FAM6_BROADWELL_XEON_D, INTEL_PSTATE_HWP_BROADWELL),
 +      ICPU_HWP(INTEL_FAM6_BROADWELL_D, INTEL_PSTATE_HWP_BROADWELL),
        ICPU_HWP(X86_MODEL_ANY, 0),
        {}
  };
diff --combined drivers/cpuidle/Makefile
index 40d016339b29e2e6f24da7d66af105bedb891381,240227474cd987a07f3547fa755fcbbcfba1ac40..ee70d5cc5b996b446bb130dd8ee47dae63c4c23d
@@@ -7,6 -7,7 +7,7 @@@ obj-y += cpuidle.o driver.o governor.o 
  obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o
  obj-$(CONFIG_DT_IDLE_STATES)            += dt_idle_states.o
  obj-$(CONFIG_ARCH_HAS_CPU_RELAX)        += poll_state.o
+ obj-$(CONFIG_HALTPOLL_CPUIDLE)                  += cpuidle-haltpoll.o
  
  ##################################################################################
  # ARM SoC drivers
@@@ -20,7 -21,6 +21,7 @@@ obj-$(CONFIG_ARM_U8500_CPUIDLE
  obj-$(CONFIG_ARM_AT91_CPUIDLE)          += cpuidle-at91.o
  obj-$(CONFIG_ARM_EXYNOS_CPUIDLE)        += cpuidle-exynos.o
  obj-$(CONFIG_ARM_CPUIDLE)             += cpuidle-arm.o
 +obj-$(CONFIG_ARM_PSCI_CPUIDLE)                += cpuidle-psci.o
  
  ###############################################################################
  # MIPS drivers
diff --combined include/linux/acpi.h
index 0fecacca51e889f6d05966b0e843fd84cb638f60,e65a4c5bbeaefcd1b0c84eb7a062976a080cbf7c..978cc239f23b97802a787d297e954465c969ef5f
@@@ -931,6 -931,8 +931,8 @@@ int acpi_subsys_suspend_noirq(struct de
  int acpi_subsys_suspend(struct device *dev);
  int acpi_subsys_freeze(struct device *dev);
  int acpi_subsys_poweroff(struct device *dev);
+ void acpi_ec_mark_gpe_for_wake(void);
+ void acpi_ec_set_gpe_wake_mask(u8 action);
  #else
  static inline int acpi_subsys_prepare(struct device *dev) { return 0; }
  static inline void acpi_subsys_complete(struct device *dev) {}
@@@ -939,6 -941,8 +941,8 @@@ static inline int acpi_subsys_suspend_n
  static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
  static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
  static inline int acpi_subsys_poweroff(struct device *dev) { return 0; }
+ static inline void acpi_ec_mark_gpe_for_wake(void) {}
+ static inline void acpi_ec_set_gpe_wake_mask(u8 action) {}
  #endif
  
  #ifdef CONFIG_ACPI
@@@ -994,11 -998,62 +998,11 @@@ void __acpi_handle_debug(struct _ddebu
  #endif
  #endif
  
 -struct acpi_gpio_params {
 -      unsigned int crs_entry_index;
 -      unsigned int line_index;
 -      bool active_low;
 -};
 -
 -struct acpi_gpio_mapping {
 -      const char *name;
 -      const struct acpi_gpio_params *data;
 -      unsigned int size;
 -
 -/* Ignore IoRestriction field */
 -#define ACPI_GPIO_QUIRK_NO_IO_RESTRICTION     BIT(0)
 -/*
 - * When ACPI GPIO mapping table is in use the index parameter inside it
 - * refers to the GPIO resource in _CRS method. That index has no
 - * distinction of actual type of the resource. When consumer wants to
 - * get GpioIo type explicitly, this quirk may be used.
 - */
 -#define ACPI_GPIO_QUIRK_ONLY_GPIOIO           BIT(1)
 -
 -      unsigned int quirks;
 -};
 -
  #if defined(CONFIG_ACPI) && defined(CONFIG_GPIOLIB)
 -int acpi_dev_add_driver_gpios(struct acpi_device *adev,
 -                            const struct acpi_gpio_mapping *gpios);
 -
 -static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev)
 -{
 -      if (adev)
 -              adev->driver_gpios = NULL;
 -}
 -
 -int devm_acpi_dev_add_driver_gpios(struct device *dev,
 -                                 const struct acpi_gpio_mapping *gpios);
 -void devm_acpi_dev_remove_driver_gpios(struct device *dev);
 -
  bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
                                struct acpi_resource_gpio **agpio);
  int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index);
  #else
 -static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev,
 -                            const struct acpi_gpio_mapping *gpios)
 -{
 -      return -ENXIO;
 -}
 -static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev) {}
 -
 -static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
 -                            const struct acpi_gpio_mapping *gpios)
 -{
 -      return -ENXIO;
 -}
 -static inline void devm_acpi_dev_remove_driver_gpios(struct device *dev) {}
 -
  static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
                                              struct acpi_resource_gpio **agpio)
  {
@@@ -1251,16 -1306,11 +1255,16 @@@ static inline int lpit_read_residency_c
  #endif
  
  #ifdef CONFIG_ACPI_PPTT
 +int acpi_pptt_cpu_is_thread(unsigned int cpu);
  int find_acpi_cpu_topology(unsigned int cpu, int level);
  int find_acpi_cpu_topology_package(unsigned int cpu);
  int find_acpi_cpu_topology_hetero_id(unsigned int cpu);
  int find_acpi_cpu_cache_topology(unsigned int cpu, int level);
  #else
 +static inline int acpi_pptt_cpu_is_thread(unsigned int cpu)
 +{
 +      return -EINVAL;
 +}
  static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
  {
        return -EINVAL;
diff --combined include/linux/cpuidle.h
index 12ae4b87494e4eb3f265e7385458afbbd00f6195,2dc4c6b19c253c860d29cc6913cb1f6f85bd448a..4b6b5bea8f793383d19eac64948097eed0426a9e
@@@ -85,7 -85,9 +85,9 @@@ struct cpuidle_device 
        unsigned int            cpu;
        ktime_t                 next_hrtimer;
  
+       int                     last_state_idx;
        int                     last_residency;
+       u64                     poll_limit_ns;
        struct cpuidle_state_usage      states_usage[CPUIDLE_STATE_MAX];
        struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX];
        struct cpuidle_driver_kobj *kobj_driver;
@@@ -119,6 -121,9 +121,9 @@@ struct cpuidle_driver 
  
        /* the driver handles the cpus in cpumask */
        struct cpumask          *cpumask;
+       /* preferred governor to switch at register time */
+       const char              *governor;
  };
  
  #ifdef CONFIG_CPU_IDLE
@@@ -132,6 -137,8 +137,8 @@@ extern int cpuidle_select(struct cpuidl
  extern int cpuidle_enter(struct cpuidle_driver *drv,
                         struct cpuidle_device *dev, int index);
  extern void cpuidle_reflect(struct cpuidle_device *dev, int index);
+ extern u64 cpuidle_poll_time(struct cpuidle_driver *drv,
+                            struct cpuidle_device *dev);
  
  extern int cpuidle_register_driver(struct cpuidle_driver *drv);
  extern struct cpuidle_driver *cpuidle_get_driver(void);
@@@ -166,6 -173,9 +173,9 @@@ static inline int cpuidle_enter(struct 
                                struct cpuidle_device *dev, int index)
  {return -ENODEV; }
  static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { }
+ static inline u64 cpuidle_poll_time(struct cpuidle_driver *drv,
+                            struct cpuidle_device *dev)
+ {return 0; }
  static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
  {return -ENODEV; }
  static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
@@@ -256,10 -266,7 +266,10 @@@ static inline int cpuidle_register_gove
  {return 0;}
  #endif
  
 -#define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, is_retention) \
 +#define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter,                 \
 +                              idx,                                    \
 +                              state,                                  \
 +                              is_retention)                           \
  ({                                                                    \
        int __ret = 0;                                                  \
                                                                        \
        if (!is_retention)                                              \
                __ret =  cpu_pm_enter();                                \
        if (!__ret) {                                                   \
 -              __ret = low_level_idle_enter(idx);                      \
 +              __ret = low_level_idle_enter(state);                    \
                if (!is_retention)                                      \
                        cpu_pm_exit();                                  \
        }                                                               \
  })
  
  #define CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx)      \
 -      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, 0)
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, idx, 0)
  
  #define CPU_PM_CPU_IDLE_ENTER_RETENTION(low_level_idle_enter, idx)    \
 -      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, 1)
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, idx, 1)
 +
 +#define CPU_PM_CPU_IDLE_ENTER_PARAM(low_level_idle_enter, idx, state) \
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, state, 0)
 +
 +#define CPU_PM_CPU_IDLE_ENTER_RETENTION_PARAM(low_level_idle_enter, idx, state)       \
 +      __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, idx, state, 1)
  
  #endif /* _LINUX_CPUIDLE_H */
index 07b527dca99601f2e5d33a9c80b160aca7fbd387,0e9cdb3efda742b4f72d09fbd8b21f14f87c0969..89fc59dab57d2605edc21a96a478e79d84de2c17
@@@ -238,6 -238,7 +238,7 @@@ extern void teardown_percpu_nmi(unsigne
  /* The following three functions are for the core kernel use only. */
  extern void suspend_device_irqs(void);
  extern void resume_device_irqs(void);
+ extern void rearm_wake_irq(unsigned int irq);
  
  /**
   * struct irq_affinity_notify - context for notification of IRQ affinity changes
@@@ -472,11 -473,7 +473,11 @@@ extern int irq_set_irqchip_state(unsign
                                 bool state);
  
  #ifdef CONFIG_IRQ_FORCED_THREADING
 +# ifdef CONFIG_PREEMPT_RT
 +#  define force_irqthreads    (true)
 +# else
  extern bool force_irqthreads;
 +# endif
  #else
  #define force_irqthreads      (0)
  #endif
index fdce9cfaca05b802c87a232d77903d6731809716,b03ca2f73713dfb516f5644bbd62d59151d6cd15..86800b4d5453f00e5c2c46b09791dc51242ef663
@@@ -117,6 -117,7 +117,7 @@@ static void sugov_fast_switch(struct su
                              unsigned int next_freq)
  {
        struct cpufreq_policy *policy = sg_policy->policy;
+       int cpu;
  
        if (!sugov_update_next_freq(sg_policy, time, next_freq))
                return;
                return;
  
        policy->cur = next_freq;
-       trace_cpu_frequency(next_freq, smp_processor_id());
+       if (trace_cpu_frequency_enabled()) {
+               for_each_cpu(cpu, policy->cpus)
+                       trace_cpu_frequency(next_freq, cpu);
+       }
  }
  
  static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,
@@@ -263,9 -268,9 +268,9 @@@ unsigned long schedutil_cpu_util(int cp
         * irq metric. Because IRQ/steal time is hidden from the task clock we
         * need to scale the task numbers:
         *
 -       *              1 - irq
 -       *   U' = irq + ------- * U
 -       *                max
 +       *              max - irq
 +       *   U' = irq + --------- * U
 +       *                 max
         */
        util = scale_irq_capacity(util, irq, max);
        util += irq;
diff --combined kernel/sched/idle.c
index 8bfeb6395bddb9f5c3ccc1267475b55ae7c3d086,b98283fc69145165b26620ed1563c944b1c5f294..c892c6280c9f8e9d8ed45b57b2882789275d608d
@@@ -241,14 -241,13 +241,14 @@@ static void do_idle(void
                check_pgt_cache();
                rmb();
  
 +              local_irq_disable();
 +
                if (cpu_is_offline(cpu)) {
 -                      tick_nohz_idle_stop_tick_protected();
 +                      tick_nohz_idle_stop_tick();
                        cpuhp_report_idle_dead();
                        arch_cpu_idle_dead();
                }
  
 -              local_irq_disable();
                arch_cpu_idle_enter();
  
                /*
@@@ -312,7 -311,7 +312,7 @@@ static enum hrtimer_restart idle_inject
        return HRTIMER_NORESTART;
  }
  
- void play_idle(unsigned long duration_ms)
+ void play_idle(unsigned long duration_us)
  {
        struct idle_timer it;
  
        WARN_ON_ONCE(current->nr_cpus_allowed != 1);
        WARN_ON_ONCE(!(current->flags & PF_KTHREAD));
        WARN_ON_ONCE(!(current->flags & PF_NO_SETAFFINITY));
-       WARN_ON_ONCE(!duration_ms);
+       WARN_ON_ONCE(!duration_us);
  
        rcu_sleep_check();
        preempt_disable();
        it.done = 0;
        hrtimer_init_on_stack(&it.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        it.timer.function = idle_inject_timer_fn;
-       hrtimer_start(&it.timer, ms_to_ktime(duration_ms), HRTIMER_MODE_REL_PINNED);
+       hrtimer_start(&it.timer, ns_to_ktime(duration_us * NSEC_PER_USEC),
+                     HRTIMER_MODE_REL_PINNED);
  
        while (!READ_ONCE(it.done))
                do_idle();
@@@ -375,27 -375,14 +376,27 @@@ static void check_preempt_curr_idle(str
        resched_curr(rq);
  }
  
 -static struct task_struct *
 -pick_next_task_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 +static void put_prev_task_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 +{
 +}
 +
 +static void set_next_task_idle(struct rq *rq, struct task_struct *next)
  {
 -      put_prev_task(rq, prev);
        update_idle_core(rq);
        schedstat_inc(rq->sched_goidle);
 +}
 +
 +static struct task_struct *
 +pick_next_task_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 +{
 +      struct task_struct *next = rq->idle;
  
 -      return rq->idle;
 +      if (prev)
 +              put_prev_task(rq, prev);
 +
 +      set_next_task_idle(rq, next);
 +
 +      return next;
  }
  
  /*
@@@ -411,6 -398,10 +412,6 @@@ dequeue_task_idle(struct rq *rq, struc
        raw_spin_lock_irq(&rq->lock);
  }
  
 -static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
 -{
 -}
 -
  /*
   * scheduler tick hitting a task of our scheduling class.
   *
@@@ -423,6 -414,10 +424,6 @@@ static void task_tick_idle(struct rq *r
  {
  }
  
 -static void set_curr_task_idle(struct rq *rq)
 -{
 -}
 -
  static void switched_to_idle(struct rq *rq, struct task_struct *p)
  {
        BUG();
@@@ -457,13 -452,13 +458,13 @@@ const struct sched_class idle_sched_cla
  
        .pick_next_task         = pick_next_task_idle,
        .put_prev_task          = put_prev_task_idle,
 +      .set_next_task          = set_next_task_idle,
  
  #ifdef CONFIG_SMP
        .select_task_rq         = select_task_rq_idle,
        .set_cpus_allowed       = set_cpus_allowed_common,
  #endif
  
 -      .set_curr_task          = set_curr_task_idle,
        .task_tick              = task_tick_idle,
  
        .get_rr_interval        = get_rr_interval_idle,
diff --combined kernel/time/alarmtimer.c
index 271ce6c12907860bc2db9ae94fab4e70dbedbbfb,93b382d9701cd4658a9d203e6ff5be020b91a213..451f9d05ccfec5397eee2784fb92e695d2e9c86e
@@@ -97,7 -97,7 +97,7 @@@ static int alarmtimer_rtc_add_device(st
        if (!device_may_wakeup(rtc->dev.parent))
                return -1;
  
-       __ws = wakeup_source_register("alarmtimer");
+       __ws = wakeup_source_register(dev, "alarmtimer");
  
        spin_lock_irqsave(&rtcdev_lock, flags);
        if (!rtcdev) {
@@@ -432,7 -432,7 +432,7 @@@ int alarm_cancel(struct alarm *alarm
                int ret = alarm_try_to_cancel(alarm);
                if (ret >= 0)
                        return ret;
 -              cpu_relax();
 +              hrtimer_cancel_wait_running(&alarm->timer);
        }
  }
  EXPORT_SYMBOL_GPL(alarm_cancel);
@@@ -605,19 -605,6 +605,19 @@@ static int alarm_timer_try_to_cancel(st
        return alarm_try_to_cancel(&timr->it.alarm.alarmtimer);
  }
  
 +/**
 + * alarm_timer_wait_running - Posix timer callback to wait for a timer
 + * @timr:     Pointer to the posixtimer data struct
 + *
 + * Called from the core code when timer cancel detected that the callback
 + * is running. @timr is unlocked and rcu read lock is held to prevent it
 + * from being freed.
 + */
 +static void alarm_timer_wait_running(struct k_itimer *timr)
 +{
 +      hrtimer_cancel_wait_running(&timr->it.alarm.alarmtimer.timer);
 +}
 +
  /**
   * alarm_timer_arm - Posix timer callback to arm a timer
   * @timr:     Pointer to the posixtimer data struct
@@@ -685,7 -672,7 +685,7 @@@ static int alarm_timer_create(struct k_
        enum  alarmtimer_type type;
  
        if (!alarmtimer_get_rtcdev())
 -              return -ENOTSUPP;
 +              return -EOPNOTSUPP;
  
        if (!capable(CAP_WAKE_ALARM))
                return -EPERM;
@@@ -803,7 -790,7 +803,7 @@@ static int alarm_timer_nsleep(const clo
        int ret = 0;
  
        if (!alarmtimer_get_rtcdev())
 -              return -ENOTSUPP;
 +              return -EOPNOTSUPP;
  
        if (flags & ~TIMER_ABSTIME)
                return -EINVAL;
@@@ -847,7 -834,6 +847,7 @@@ const struct k_clock alarm_clock = 
        .timer_forward          = alarm_timer_forward,
        .timer_remaining        = alarm_timer_remaining,
        .timer_try_to_cancel    = alarm_timer_try_to_cancel,
 +      .timer_wait_running     = alarm_timer_wait_running,
        .nsleep                 = alarm_timer_nsleep,
  };
  #endif /* CONFIG_POSIX_TIMERS */
This page took 0.225984 seconds and 4 git commands to generate.