Merge tag 'pm+acpi-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Nov 2013 04:41:48 +0000 (13:41 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Nov 2013 04:41:48 +0000 (13:41 +0900)
Pull ACPI and power management updates from Rafael J Wysocki:

 - New power capping framework and the the Intel Running Average Power
   Limit (RAPL) driver using it from Srinivas Pandruvada and Jacob Pan.

 - Addition of the in-kernel switching feature to the arm_big_little
   cpufreq driver from Viresh Kumar and Nicolas Pitre.

 - cpufreq support for iMac G5 from Aaro Koskinen.

 - Baytrail processors support for intel_pstate from Dirk Brandewie.

 - cpufreq support for Midway/ECX-2000 from Mark Langsdorf.

 - ARM vexpress/TC2 cpufreq support from Sudeep KarkadaNagesha.

 - ACPI power management support for the I2C and SPI bus types from Mika
   Westerberg and Lv Zheng.

 - cpufreq core fixes and cleanups from Viresh Kumar, Srivatsa S Bhat,
   Stratos Karafotis, Xiaoguang Chen, Lan Tianyu.

 - cpufreq drivers updates (mostly fixes and cleanups) from Viresh
   Kumar, Aaro Koskinen, Jungseok Lee, Sudeep KarkadaNagesha, Lukasz
   Majewski, Manish Badarkhe, Hans-Christian Egtvedt, Evgeny Kapaev.

 - intel_pstate updates from Dirk Brandewie and Adrian Huang.

 - ACPICA update to version 20130927 includig fixes and cleanups and
   some reduction of divergences between the ACPICA code in the kernel
   and ACPICA upstream in order to improve the automatic ACPICA patch
   generation process.  From Bob Moore, Lv Zheng, Tomasz Nowicki, Naresh
   Bhat, Bjorn Helgaas, David E Box.

 - ACPI IPMI driver fixes and cleanups from Lv Zheng.

 - ACPI hotplug fixes and cleanups from Bjorn Helgaas, Toshi Kani, Zhang
   Yanfei, Rafael J Wysocki.

 - Conversion of the ACPI AC driver to the platform bus type and
   multiple driver fixes and cleanups related to ACPI from Zhang Rui.

 - ACPI processor driver fixes and cleanups from Hanjun Guo, Jiang Liu,
   Bartlomiej Zolnierkiewicz, Mathieu Rhéaume, Rafael J Wysocki.

 - Fixes and cleanups and new blacklist entries related to the ACPI
   video support from Aaron Lu, Felipe Contreras, Lennart Poettering,
   Kirill Tkhai.

 - cpuidle core cleanups from Viresh Kumar and Lorenzo Pieralisi.

 - cpuidle drivers fixes and cleanups from Daniel Lezcano, Jingoo Han,
   Bartlomiej Zolnierkiewicz, Prarit Bhargava.

 - devfreq updates from Sachin Kamat, Dan Carpenter, Manish Badarkhe.

 - Operation Performance Points (OPP) core updates from Nishanth Menon.

 - Runtime power management core fix from Rafael J Wysocki and update
   from Ulf Hansson.

 - Hibernation fixes from Aaron Lu and Rafael J Wysocki.

 - Device suspend/resume lockup detection mechanism from Benoit Goby.

 - Removal of unused proc directories created for various ACPI drivers
   from Lan Tianyu.

 - ACPI LPSS driver fix and new device IDs for the ACPI platform scan
   handler from Heikki Krogerus and Jarkko Nikula.

 - New ACPI _OSI blacklist entry for Toshiba NB100 from Levente Kurusa.

 - Assorted fixes and cleanups related to ACPI from Andy Shevchenko, Al
   Stone, Bartlomiej Zolnierkiewicz, Colin Ian King, Dan Carpenter,
   Felipe Contreras, Jianguo Wu, Lan Tianyu, Yinghai Lu, Mathias Krause,
   Liu Chuansheng.

 - Assorted PM fixes and cleanups from Andy Shevchenko, Thierry Reding,
   Jean-Christophe Plagniol-Villard.

* tag 'pm+acpi-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (386 commits)
  cpufreq: conservative: fix requested_freq reduction issue
  ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
  PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()
  ACPI / event: remove unneeded NULL pointer check
  Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
  ACPI / video: Quirk initial backlight level 0
  ACPI / video: Fix initial level validity test
  intel_pstate: skip the driver if ACPI has power mgmt option
  PM / hibernate: Avoid overflow in hibernate_preallocate_memory()
  ACPI / hotplug: Do not execute "insert in progress" _OST
  ACPI / hotplug: Carry out PCI root eject directly
  ACPI / hotplug: Merge device hot-removal routines
  ACPI / hotplug: Make acpi_bus_hot_remove_device() internal
  ACPI / hotplug: Simplify device ejection routines
  ACPI / hotplug: Fix handle_root_bridge_removal()
  ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
  ACPI / scan: Start matching drivers after trying scan handlers
  ACPI: Remove acpi_pci_slot_init() headers from internal.h
  ACPI / blacklist: fix name of ThinkPad Edge E530
  PowerCap: Fix build error with option -Werror=format-security
  ...

Conflicts:
arch/arm/mach-omap2/opp.c
drivers/Kconfig
drivers/spi/spi.c

30 files changed:
1  2 
MAINTAINERS
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/mach-exynos4-dt.c
arch/arm/mach-exynos/mach-exynos5-dt.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/opp.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-ux500/Kconfig
arch/arm/mach-vexpress/Kconfig
arch/arm/mach-vexpress/tc2_pm.c
arch/blackfin/Kconfig
arch/x86/Kconfig
arch/x86/kernel/smpboot.c
drivers/Kconfig
drivers/Makefile
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/processor_idle.c
drivers/cpufreq/integrator-cpufreq.c
drivers/cpufreq/pasemi-cpufreq.c
drivers/cpuidle/Kconfig.arm
drivers/idle/intel_idle.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/platform/x86/thinkpad_acpi.c
drivers/spi/spi.c
include/linux/acpi.h
include/linux/bitops.h
include/linux/cpu.h

diff --combined MAINTAINERS
@@@ -253,6 -253,20 +253,20 @@@ F:       drivers/pci/*acpi
  F:    drivers/pci/*/*acpi*
  F:    drivers/pci/*/*/*acpi*
  
+ ACPI COMPONENT ARCHITECTURE (ACPICA)
+ M:    Robert Moore <robert.moore@intel.com>
+ M:    Lv Zheng <lv.zheng@intel.com>
+ M:    Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+ L:    linux-acpi@vger.kernel.org
+ L:    devel@acpica.org
+ W:    https://acpica.org/
+ W:    https://github.com/acpica/acpica/
+ Q:    https://patchwork.kernel.org/project/linux-acpi/list/
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
+ S:    Supported
+ F:    drivers/acpi/acpica/
+ F:    include/acpi/
  ACPI FAN DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
@@@ -763,10 -777,6 +777,10 @@@ W:       http://maxim.org.za/at91_26.htm
  W:    http://www.linux4sam.org
  S:    Supported
  F:    arch/arm/mach-at91/
 +F:    arch/arm/boot/dts/at91*.dts
 +F:    arch/arm/boot/dts/at91*.dtsi
 +F:    arch/arm/boot/dts/sama*.dts
 +F:    arch/arm/boot/dts/sama*.dtsi
  
  ARM/CALXEDA HIGHBANK ARCHITECTURE
  M:    Rob Herring <rob.herring@calxeda.com>
@@@ -933,7 -943,7 +947,7 @@@ M: Javier Martinez Canillas <javier@dow
  L:    linux-omap@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    arch/arm/mach-omap2/board-igep0020.c
 +F:    arch/arm/boot/dts/omap3-igep*
  
  ARM/INCOME PXA270 SUPPORT
  M:    Marek Vasut <marek.vasut@gmail.com>
@@@ -1161,6 -1171,11 +1175,6 @@@ S:     Maintaine
  F:    arch/arm/mach-rockchip/
  F:    drivers/*/*rockchip*
  
 -ARM/SHARK MACHINE SUPPORT
 -M:    Alexander Schulz <alex@shark-linux.de>
 -W:    http://www.shark-linux.de/shark.html
 -S:    Maintained
 -
  ARM/SAMSUNG ARM ARCHITECTURES
  M:    Ben Dooks <ben-linux@fluff.org>
  M:    Kukjin Kim <kgene.kim@samsung.com>
@@@ -1168,8 -1183,6 +1182,8 @@@ L:      linux-arm-kernel@lists.infradead.or
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  W:    http://www.fluff.org/ben/linux/
  S:    Maintained
 +F:    arch/arm/boot/dts/s3c*
 +F:    arch/arm/boot/dts/exynos*
  F:    arch/arm/plat-samsung/
  F:    arch/arm/mach-s3c24*/
  F:    arch/arm/mach-s3c64xx/
@@@ -1661,15 -1674,16 +1675,15 @@@ S:   Maintaine
  F:    drivers/net/wireless/b43legacy/
  
  BACKLIGHT CLASS/SUBSYSTEM
 -M:    Richard Purdie <rpurdie@rpsys.net>
  M:    Jingoo Han <jg1.han@samsung.com>
  S:    Maintained
  F:    drivers/video/backlight/
  F:    include/linux/backlight.h
  
  BATMAN ADVANCED
 -M:    Marek Lindner <lindner_marek@yahoo.de>
 -M:    Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
 -M:    Antonio Quartulli <ordex@autistici.org>
 +M:    Marek Lindner <mareklindner@neomailbox.ch>
 +M:    Simon Wunderlich <sw@simonwunderlich.de>
 +M:    Antonio Quartulli <antonio@meshcoding.com>
  L:    b.a.t.m.a.n@lists.open-mesh.org
  W:    http://www.open-mesh.org/
  S:    Maintained
@@@ -1822,7 -1836,7 +1836,7 @@@ F:      drivers/net/ethernet/broadcom/bnx2.
  F:    drivers/net/ethernet/broadcom/bnx2_*
  
  BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
 -M:    Eilon Greenstein <eilong@broadcom.com>
 +M:    Ariel Elior <ariele@broadcom.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2x/
@@@ -1867,7 -1881,7 +1881,7 @@@ S:      Supporte
  F:    drivers/net/wireless/brcm80211/
  
  BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER
 -M:    Bhanu Prakash Gollapudi <bprakash@broadcom.com>
 +M:    Eddie Wai <eddie.wai@broadcom.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bnx2fc/
@@@ -2372,7 -2386,7 +2386,7 @@@ F:      kernel/cpuset.
  
  CRAMFS FILESYSTEM
  W:    http://sourceforge.net/projects/cramfs/
 -S:    Orphan
 +S:    Orphan / Obsolete
  F:    Documentation/filesystems/cramfs.txt
  F:    fs/cramfs/
  
@@@ -2647,7 -2661,6 +2661,7 @@@ M:      dm-devel@redhat.co
  L:    dm-devel@redhat.com
  W:    http://sources.redhat.com/dm
  Q:    http://patchwork.kernel.org/project/dm-devel/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
  T:    quilt http://people.redhat.com/agk/patches/linux/editing/
  S:    Maintained
  F:    Documentation/device-mapper/
@@@ -3692,14 -3705,6 +3706,14 @@@ S:    Maintaine
  F:    include/asm-generic/
  F:    include/uapi/asm-generic/
  
 +GENERIC PHY FRAMEWORK
 +M:    Kishon Vijay Abraham I <kishon@ti.com>
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
 +S:    Supported
 +F:    drivers/phy/
 +F:    include/linux/phy/
 +
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
@@@ -4241,7 -4246,7 +4255,7 @@@ S:      Maintaine
  F:    drivers/media/rc/iguanair.c
  
  IIO SUBSYSTEM AND DRIVERS
 -M:    Jonathan Cameron <jic23@cam.ac.uk>
 +M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/
@@@ -4440,12 -4445,6 +4454,12 @@@ F:    Documentation/networking/ixgbevf.tx
  F:    Documentation/networking/i40e.txt
  F:    drivers/net/ethernet/intel/
  
 +INTEL-MID GPIO DRIVER
 +M:    David Cohen <david.a.cohen@linux.intel.com>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-intel-mid.c
 +
  INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
  M:    Stanislav Yakovlev <stas.yakovlev@gmail.com>
  L:    linux-wireless@vger.kernel.org
@@@ -4784,13 -4783,6 +4798,13 @@@ S:    Maintaine
  F:    Documentation/hwmon/k8temp
  F:    drivers/hwmon/k8temp.c
  
 +KTAP
 +M:    Jovi Zhangwei <jovi.zhangwei@gmail.com>
 +W:    http://www.ktap.org
 +L:    ktap@freelists.org
 +S:    Maintained
 +F:    drivers/staging/ktap/
 +
  KCONFIG
  M:    Michal Marek <mmarek@suse.cz>
  L:    linux-kbuild@vger.kernel.org
@@@ -5375,7 -5367,7 +5389,7 @@@ S:      Orpha
  F:    drivers/net/wireless/libertas/
  
  MARVELL MV643XX ETHERNET DRIVER
 -M:    Lennert Buytenhek <buytenh@wantstofly.org>
 +M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/marvell/mv643xx_eth.*
@@@ -6131,12 -6123,6 +6145,12 @@@ L:    linux-omap@vger.kernel.or
  S:    Maintained
  F:    drivers/gpio/gpio-omap.c
  
 +OMAP/NEWFLOW NANOBONE MACHINE SUPPORT
 +M:    Mark Jackson <mpfj@newflow.co.uk>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    arch/arm/boot/dts/am335x-nano.dts
 +
  OMFS FILESYSTEM
  M:    Bob Copeland <me@bobcopeland.com>
  L:    linux-karma-devel@lists.sourceforge.net
@@@ -6891,14 -6877,6 +6905,14 @@@ L:    linux-hexagon@vger.kernel.or
  S:    Supported
  F:    arch/hexagon/
  
 +QUALCOMM WCN36XX WIRELESS DRIVER
 +M:    Eugene Krasnikov <k.eugene.e@gmail.com>
 +L:    wcn36xx@lists.infradead.org
 +W:    http://wireless.kernel.org/en/users/Drivers/wcn36xx
 +T:    git git://github.com/KrasnikovEugene/wcn36xx.git
 +S:    Supported
 +F:    drivers/net/wireless/ath/wcn36xx/
 +
  QUICKCAM PARALLEL PORT WEBCAMS
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -6986,7 -6964,7 +7000,7 @@@ M:      "Paul E. McKenney" <paulmck@linux.vn
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    Documentation/RCU/torture.txt
 -F:    kernel/rcutorture.c
 +F:    kernel/rcu/torture.c
  
  RDC R-321X SoC
  M:    Florian Fainelli <florian@openwrt.org>
@@@ -7013,9 -6991,8 +7027,9 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/
  X:    Documentation/RCU/torture.txt
  F:    include/linux/rcu*
 -F:    kernel/rcu*
 -X:    kernel/rcutorture.c
 +X:    include/linux/srcu.h
 +F:    kernel/rcu/
 +X:    kernel/rcu/torture.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
@@@ -7328,7 -7305,7 +7342,7 @@@ S:      Odd Fixe
  F:    drivers/media/usb/tlg2300/
  
  SC1200 WDT DRIVER
 -M:    Zwane Mwaikambo <zwane@arm.linux.org.uk>
 +M:    Zwane Mwaikambo <zwanem@gmail.com>
  S:    Maintained
  F:    drivers/watchdog/sc1200wdt.c
  
@@@ -7340,8 -7317,6 +7354,8 @@@ S:      Maintaine
  F:    kernel/sched/
  F:    include/linux/sched.h
  F:    include/uapi/linux/sched.h
 +F:    kernel/wait.c
 +F:    include/linux/wait.h
  
  SCORE ARCHITECTURE
  M:    Chen Liqin <liqin.linux@gmail.com>
@@@ -7704,8 -7679,8 +7718,8 @@@ M:      "Paul E. McKenney" <paulmck@linux.vn
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
 -F:    include/linux/srcu*
 -F:    kernel/srcu*
 +F:    include/linux/srcu.h
 +F:    kernel/rcu/srcu.c
  
  SMACK SECURITY MODULE
  M:    Casey Schaufler <casey@schaufler-ca.com>
@@@ -8040,7 -8015,7 +8054,7 @@@ S:      Maintaine
  F:    drivers/staging/media/go7007/
  
  STAGING - INDUSTRIAL IO
 -M:    Jonathan Cameron <jic23@cam.ac.uk>
 +M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Odd Fixes
  F:    drivers/staging/iio/
@@@ -8721,6 -8696,14 +8735,6 @@@ S:     Maintaine
  F:    arch/m68k/*/*_no.*
  F:    arch/m68k/include/asm/*_no.*
  
 -UCLINUX FOR RENESAS H8/300 (H8300)
 -M:    Yoshinori Sato <ysato@users.sourceforge.jp>
 -W:    http://uclinux-h8.sourceforge.jp/
 -S:    Supported
 -F:    arch/h8300/
 -F:    drivers/ide/ide-h8300.c
 -F:    drivers/net/ethernet/8390/ne-h8300.c
 -
  UDF FILESYSTEM
  M:    Jan Kara <jack@suse.cz>
  S:    Maintained
@@@ -8948,14 -8931,61 +8962,14 @@@ W:   http://pegasus2.sourceforge.net
  S:    Maintained
  F:    drivers/net/usb/rtl8150.c
  
 -USB SERIAL BELKIN F5U103 DRIVER
 -M:    William Greathouse <wgreathouse@smva.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/belkin_sa.*
 -
 -USB SERIAL CYPRESS M8 DRIVER
 -M:    Lonnie Mendez <dignome@gmail.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -W:    http://geocities.com/i0xox0i
 -W:    http://firstlight.net/cvs
 -F:    drivers/usb/serial/cypress_m8.*
 -
 -USB SERIAL CYBERJACK DRIVER
 -M:    Matthias Bruestle and Harald Welte <support@reiner-sct.com>
 -W:    http://www.reiner-sct.de/support/treiber_cyberjack.php
 -S:    Maintained
 -F:    drivers/usb/serial/cyberjack.c
 -
 -USB SERIAL DIGI ACCELEPORT DRIVER
 -M:    Peter Berger <pberger@brimson.com>
 -M:    Al Borchers <alborchers@steinerpoint.com>
 +USB SERIAL SUBSYSTEM
 +M:    Johan Hovold <jhovold@gmail.com>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
 -F:    drivers/usb/serial/digi_acceleport.c
 -
 -USB SERIAL DRIVER
 -M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -L:    linux-usb@vger.kernel.org
 -S:    Supported
  F:    Documentation/usb/usb-serial.txt
 -F:    drivers/usb/serial/generic.c
 -F:    drivers/usb/serial/usb-serial.c
 +F:    drivers/usb/serial/
  F:    include/linux/usb/serial.h
  
 -USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER
 -M:    Gary Brubaker <xavyer@ix.netcom.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/empeg.c
 -
 -USB SERIAL KEYSPAN DRIVER
 -M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/*keyspan*
 -
 -USB SERIAL WHITEHEAT DRIVER
 -M:    Support Department <support@connecttech.com>
 -L:    linux-usb@vger.kernel.org
 -W:    http://www.connecttech.com
 -S:    Supported
 -F:    drivers/usb/serial/whiteheat*
 -
  USB SMSC75XX ETHERNET DRIVER
  M:    Steve Glendinning <steve.glendinning@shawell.net>
  L:    netdev@vger.kernel.org
  #include <linux/export.h>
  #include <linux/irqdomain.h>
  #include <linux/of_address.h>
 -#include <linux/clocksource.h>
 -#include <linux/clk-provider.h>
  #include <linux/irqchip/arm-gic.h>
  #include <linux/irqchip/chained_irq.h>
+ #include <linux/platform_device.h>
  
  #include <asm/proc-fns.h>
  #include <asm/exception.h>
@@@ -292,6 -295,16 +293,16 @@@ void exynos5_restart(enum reboot_mode m
        __raw_writel(val, addr);
  }
  
+ static struct platform_device exynos_cpuidle = {
+       .name           = "exynos_cpuidle",
+       .id             = -1,
+ };
+ void __init exynos_cpuidle_init(void)
+ {
+       platform_device_register(&exynos_cpuidle);
+ }
  void __init exynos_init_late(void)
  {
        if (of_machine_is_compatible("samsung,exynos5440"))
@@@ -365,6 -378,12 +376,6 @@@ static void __init exynos5_map_io(void
                iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
  }
  
 -void __init exynos_init_time(void)
 -{
 -      of_clk_init(NULL);
 -      clocksource_of_init();
 -}
 -
  struct bus_type exynos_subsys = {
        .name           = "exynos-core",
        .dev_name       = "exynos-core",
  #include <linux/of.h>
  
  void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 -void exynos_init_time(void);
  
  struct map_desc;
  void exynos_init_io(void);
  void exynos4_restart(enum reboot_mode mode, const char *cmd);
  void exynos5_restart(enum reboot_mode mode, const char *cmd);
+ void exynos_cpuidle_init(void);
  void exynos_init_late(void);
  
  void exynos_firmware_init(void);
   * published by the Free Software Foundation.
  */
  
 -#include <linux/kernel.h>
  #include <linux/of_platform.h>
  #include <linux/of_fdt.h>
 -#include <linux/serial_core.h>
 -#include <linux/memblock.h>
 -#include <linux/clocksource.h>
  
  #include <asm/mach/arch.h>
  #include <plat/mfc.h>
@@@ -21,6 -25,8 +21,8 @@@
  
  static void __init exynos4_dt_machine_init(void)
  {
+       exynos_cpuidle_init();
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  }
  
@@@ -50,6 -56,7 +52,6 @@@ DT_MACHINE_START(EXYNOS4210_DT, "Samsun
        .init_early     = exynos_firmware_init,
        .init_machine   = exynos4_dt_machine_init,
        .init_late      = exynos_init_late,
 -      .init_time      = exynos_init_time,
        .dt_compat      = exynos4_dt_compat,
        .restart        = exynos4_restart,
        .reserve        = exynos4_reserve,
  
  #include <linux/of_platform.h>
  #include <linux/of_fdt.h>
 -#include <linux/memblock.h>
  #include <linux/io.h>
 -#include <linux/clocksource.h>
  
  #include <asm/mach/arch.h>
  #include <mach/regs-pmu.h>
 -
 -#include <plat/cpu.h>
  #include <plat/mfc.h>
  
  #include "common.h"
@@@ -43,6 -47,8 +43,8 @@@ static void __init exynos5_dt_machine_i
                }
        }
  
+       exynos_cpuidle_init();
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  }
  
@@@ -72,6 -78,7 +74,6 @@@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG E
        .map_io         = exynos_init_io,
        .init_machine   = exynos5_dt_machine_init,
        .init_late      = exynos_init_late,
 -      .init_time      = exynos_init_time,
        .dt_compat      = exynos5_dt_compat,
        .restart        = exynos5_restart,
        .reserve        = exynos5_reserve,
   */
  
  #include <linux/clk.h>
 -#include <linux/clk-provider.h>
  #include <linux/clkdev.h>
 -#include <linux/clocksource.h>
  #include <linux/cpu.h>
 -#include <linux/delay.h>
  #include <linux/export.h>
  #include <linux/init.h>
  #include <linux/io.h>
@@@ -22,7 -25,7 +22,7 @@@
  #include <linux/of_address.h>
  #include <linux/of_irq.h>
  #include <linux/of_platform.h>
- #include <linux/opp.h>
+ #include <linux/pm_opp.h>
  #include <linux/phy.h>
  #include <linux/reboot.h>
  #include <linux/regmap.h>
  #include "cpuidle.h"
  #include "hardware.h"
  
 -static u32 chip_revision;
 -
 -int imx6q_revision(void)
 -{
 -      return chip_revision;
 -}
 -
 -static void __init imx6q_init_revision(void)
 -{
 -      u32 rev = imx_anatop_get_digprog();
 -
 -      switch (rev & 0xff) {
 -      case 0:
 -              chip_revision = IMX_CHIP_REVISION_1_0;
 -              break;
 -      case 1:
 -              chip_revision = IMX_CHIP_REVISION_1_1;
 -              break;
 -      case 2:
 -              chip_revision = IMX_CHIP_REVISION_1_2;
 -              break;
 -      default:
 -              chip_revision = IMX_CHIP_REVISION_UNKNOWN;
 -      }
 -
 -      mxc_set_cpu_type(rev >> 16 & 0xff);
 -}
 -
 -static void imx6q_restart(enum reboot_mode mode, const char *cmd)
 -{
 -      struct device_node *np;
 -      void __iomem *wdog_base;
 -
 -      np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt");
 -      wdog_base = of_iomap(np, 0);
 -      if (!wdog_base)
 -              goto soft;
 -
 -      imx_src_prepare_restart();
 -
 -      /* enable wdog */
 -      writew_relaxed(1 << 2, wdog_base);
 -      /* write twice to ensure the request will not get ignored */
 -      writew_relaxed(1 << 2, wdog_base);
 -
 -      /* wait for reset to assert ... */
 -      mdelay(500);
 -
 -      pr_err("Watchdog reset failed to assert reset\n");
 -
 -      /* delay to allow the serial port to show the message */
 -      mdelay(50);
 -
 -soft:
 -      /* we'll take a jump through zero as a poor second */
 -      soft_restart(0);
 -}
 -
  /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
  static int ksz9021rn_phy_fixup(struct phy_device *phydev)
  {
@@@ -131,20 -192,9 +131,20 @@@ static void __init imx6q_1588_init(void
  
  static void __init imx6q_init_machine(void)
  {
 +      struct device *parent;
 +
 +      imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
 +                            imx_get_soc_revision());
 +
 +      mxc_arch_reset_init_dt();
 +
 +      parent = imx_soc_device_init();
 +      if (parent == NULL)
 +              pr_warn("failed to initialize soc device\n");
 +
        imx6q_enet_phy_init();
  
 -      of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 +      of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
  
        imx_anatop_init();
        imx6q_pm_init();
@@@ -176,7 -226,7 +176,7 @@@ static void __init imx6q_opp_check_1p2g
        val = readl_relaxed(base + OCOTP_CFG3);
        val >>= OCOTP_CFG3_SPEED_SHIFT;
        if ((val & 0x3) != OCOTP_CFG3_SPEED_1P2GHZ)
-               if (opp_disable(cpu_dev, 1200000000))
+               if (dev_pm_opp_disable(cpu_dev, 1200000000))
                        pr_warn("failed to disable 1.2 GHz OPP\n");
  
  put_node:
@@@ -219,7 -269,7 +219,7 @@@ static void __init imx6q_init_late(void
         * WAIT mode is broken on TO 1.0 and 1.1, so there is no point
         * to run cpuidle on them.
         */
 -      if (imx6q_revision() > IMX_CHIP_REVISION_1_1)
 +      if (imx_get_soc_revision() > IMX_CHIP_REVISION_1_1)
                imx6q_cpuidle_init();
  
        if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
@@@ -236,13 -286,21 +236,13 @@@ static void __init imx6q_map_io(void
  
  static void __init imx6q_init_irq(void)
  {
 -      imx6q_init_revision();
 +      imx_init_revision_from_anatop();
        imx_init_l2cache();
        imx_src_init();
        imx_gpc_init();
        irqchip_init();
  }
  
 -static void __init imx6q_timer_init(void)
 -{
 -      of_clk_init(NULL);
 -      clocksource_of_init();
 -      imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
 -                            imx6q_revision());
 -}
 -
  static const char *imx6q_dt_compat[] __initdata = {
        "fsl,imx6dl",
        "fsl,imx6q",
@@@ -253,8 -311,9 +253,8 @@@ DT_MACHINE_START(IMX6Q, "Freescale i.MX
        .smp            = smp_ops(imx_smp_ops),
        .map_io         = imx6q_map_io,
        .init_irq       = imx6q_init_irq,
 -      .init_time      = imx6q_timer_init,
        .init_machine   = imx6q_init_machine,
        .init_late      = imx6q_init_late,
        .dt_compat      = imx6q_dt_compat,
 -      .restart        = imx6q_restart,
 +      .restart        = mxc_restart,
  MACHINE_END
@@@ -25,7 -25,7 +25,7 @@@
  #include <linux/gpio.h>
  #include <linux/input.h>
  #include <linux/gpio_keys.h>
- #include <linux/opp.h>
+ #include <linux/pm_opp.h>
  #include <linux/cpu.h>
  
  #include <linux/mtd/mtd.h>
@@@ -289,12 -289,18 +289,12 @@@ static struct regulator_consumer_suppl
  
  static struct gpio_led gpio_leds[];
  
 -/* PHY's VCC regulator might be added later, so flag that we need it */
 -static struct usb_phy_gen_xceiv_platform_data hsusb2_phy_data = {
 -      .needs_vcc = true,
 -};
 -
  static struct usbhs_phy_data phy_data[] = {
        {
                .port = 2,
                .reset_gpio = 147,
                .vcc_gpio = -1,         /* updated in beagle_twl_gpio_setup */
                .vcc_polarity = 1,      /* updated in beagle_twl_gpio_setup */
 -              .platform_data = &hsusb2_phy_data,
        },
  };
  
@@@ -516,11 -522,11 +516,11 @@@ static int __init beagle_opp_init(void
                        return -ENODEV;
                }
                /* Enable MPU 1GHz and lower opps */
-               r = opp_enable(mpu_dev, 800000000);
+               r = dev_pm_opp_enable(mpu_dev, 800000000);
                /* TODO: MPU 1GHz needs SR and ABB */
  
                /* Enable IVA 800MHz and lower opps */
-               r |= opp_enable(iva_dev, 660000000);
+               r |= dev_pm_opp_enable(iva_dev, 660000000);
                /* TODO: DSP 800MHz needs SR and ABB */
                if (r) {
                        pr_err("%s: failed to enable higher opp %d\n",
                         * Cleanup - disable the higher freqs - we dont care
                         * about the results
                         */
-                       opp_disable(mpu_dev, 800000000);
-                       opp_disable(iva_dev, 660000000);
+                       dev_pm_opp_disable(mpu_dev, 800000000);
+                       dev_pm_opp_disable(iva_dev, 660000000);
                }
        }
        return 0;
@@@ -17,8 -17,7 +17,8 @@@
   * GNU General Public License for more details.
   */
  #include <linux/module.h>
- #include <linux/opp.h>
 +#include <linux/of.h>
+ #include <linux/pm_opp.h>
  #include <linux/cpu.h>
  
  #include "omap_device.h"
@@@ -41,9 -40,6 +41,9 @@@ int __init omap_init_opp_table(struct o
  {
        int i, r;
  
 +      if (of_have_populated_dt())
 +              return -EINVAL;
 +
        if (!opp_def || !opp_def_size) {
                pr_err("%s: invalid params!\n", __func__);
                return -EINVAL;
                        dev = &oh->od->pdev->dev;
                }
  
-               r = opp_add(dev, opp_def->freq, opp_def->u_volt);
+               r = dev_pm_opp_add(dev, opp_def->freq, opp_def->u_volt);
                if (r) {
                        dev_err(dev, "%s: add OPP %ld failed for %s [%d] result=%d\n",
                                __func__, opp_def->freq,
                                opp_def->hwmod_name, i, r);
                } else {
                        if (!opp_def->default_available)
-                               r = opp_disable(dev, opp_def->freq);
+                               r = dev_pm_opp_disable(dev, opp_def->freq);
                        if (r)
                                dev_err(dev, "%s: disable %ld failed for %s [%d] result=%d\n",
                                        __func__, opp_def->freq,
diff --combined arch/arm/mach-omap2/pm.c
@@@ -13,7 -13,7 +13,7 @@@
  #include <linux/init.h>
  #include <linux/io.h>
  #include <linux/err.h>
- #include <linux/opp.h>
+ #include <linux/pm_opp.h>
  #include <linux/export.h>
  #include <linux/suspend.h>
  #include <linux/cpu.h>
@@@ -131,7 -131,7 +131,7 @@@ static int __init omap2_set_init_voltag
  {
        struct voltagedomain *voltdm;
        struct clk *clk;
-       struct opp *opp;
+       struct dev_pm_opp *opp;
        unsigned long freq, bootup_volt;
        struct device *dev;
  
        clk_put(clk);
  
        rcu_read_lock();
-       opp = opp_find_freq_ceil(dev, &freq);
+       opp = dev_pm_opp_find_freq_ceil(dev, &freq);
        if (IS_ERR(opp)) {
                rcu_read_unlock();
                pr_err("%s: unable to find boot up OPP for vdd_%s\n",
                goto exit;
        }
  
-       bootup_volt = opp_get_voltage(opp);
+       bootup_volt = dev_pm_opp_get_voltage(opp);
        rcu_read_unlock();
        if (!bootup_volt) {
                pr_err("%s: unable to find voltage corresponding to the bootup OPP for vdd_%s\n",
@@@ -266,12 -266,7 +266,12 @@@ static void __init omap4_init_voltages(
  
  static inline void omap_init_cpufreq(void)
  {
 -      struct platform_device_info devinfo = { .name = "omap-cpufreq", };
 +      struct platform_device_info devinfo = { };
 +
 +      if (!of_have_populated_dt())
 +              devinfo.name = "omap-cpufreq";
 +      else
 +              devinfo.name = "cpufreq-cpu0";
        platform_device_register_full(&devinfo);
  }
  
@@@ -305,11 -300,10 +305,11 @@@ int __init omap2_common_pm_late_init(vo
                /* Smartreflex device init */
                omap_devinit_smartreflex();
  
 -              /* cpufreq dummy device instantiation */
 -              omap_init_cpufreq();
        }
  
 +      /* cpufreq dummy device instantiation */
 +      omap_init_cpufreq();
 +
  #ifdef CONFIG_SUSPEND
        suspend_set_ops(&omap_pm_ops);
  #endif
@@@ -1,35 -1,39 +1,34 @@@
  config ARCH_U8500
        bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
        depends on MMU
 +      select AB8500_CORE
 +      select ABX500_CORE
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select ARM_AMBA
 -      select CLKDEV_LOOKUP
 +      select ARM_ERRATA_754322
 +      select ARM_ERRATA_764369 if SMP
 +      select ARM_GIC
 +      select CACHE_L2X0
 +      select CLKSRC_NOMADIK_MTU
 +      select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
 +      select PINCTRL
 +      select PINCTRL_ABX500
 +      select PINCTRL_NOMADIK
 +      select PL310_ERRATA_753970 if CACHE_PL310
        help
          Support for ST-Ericsson's Ux500 architecture
  
  if ARCH_U8500
  
 -config UX500_SOC_COMMON
 -      bool
 -      default y
 -      select ABX500_CORE
 -      select AB8500_CORE
 -      select ARM_ERRATA_754322
 -      select ARM_ERRATA_764369 if SMP
 -      select ARM_GIC
 -      select CACHE_L2X0
 -      select CLKSRC_NOMADIK_MTU
 -      select COMMON_CLK
 -      select PINCTRL
 -      select PINCTRL_NOMADIK
 -      select PINCTRL_ABX500
 -      select PL310_ERRATA_753970 if CACHE_PL310
 -
  config UX500_SOC_DB8500
        bool
-       select CPU_FREQ_TABLE if CPU_FREQ
        select MFD_DB8500_PRCMU
        select PINCTRL_DB8500
        select PINCTRL_DB8540
@@@ -1,16 -1,17 +1,16 @@@
  config ARCH_VEXPRESS
        bool "ARM Ltd. Versatile Express family" if ARCH_MULTI_V7
        select ARCH_REQUIRE_GPIOLIB
 +      select ARCH_SUPPORTS_BIG_ENDIAN
        select ARM_AMBA
        select ARM_GIC
        select ARM_TIMER_SP804
 -      select CLKDEV_LOOKUP
        select COMMON_CLK
        select COMMON_CLK_VERSATILE
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
 -      select HAVE_CLK
        select HAVE_PATA_PLATFORM
        select HAVE_SMP
        select ICST
@@@ -65,10 -66,22 +65,22 @@@ config ARCH_VEXPRESS_DCSC
          This is needed to provide CPU and cluster power management
          on RTSM implementing big.LITTLE.
  
+ config ARCH_VEXPRESS_SPC
+       bool "Versatile Express Serial Power Controller (SPC)"
+       select ARCH_HAS_CPUFREQ
+       select ARCH_HAS_OPP
+       select PM_OPP
+       help
+         The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
+         block called Serial Power Controller (SPC) that provides the interface
+         between the dual cluster test-chip and the M3 microcontroller that
+         carries out power management.
  config ARCH_VEXPRESS_TC2_PM
        bool "Versatile Express TC2 power management"
        depends on MCPM
        select ARM_CCI
+       select ARCH_VEXPRESS_SPC
        help
          Support for CPU and cluster power management on Versatile Express
          with a TC2 (A15x2 A7x3) big.LITTLE core tile.
@@@ -16,6 -16,7 +16,7 @@@
  #include <linux/io.h>
  #include <linux/kernel.h>
  #include <linux/of_address.h>
+ #include <linux/of_irq.h>
  #include <linux/spinlock.h>
  #include <linux/errno.h>
  #include <linux/irqchip/arm-gic.h>
@@@ -156,7 -157,32 +157,7 @@@ static void tc2_pm_down(u64 residency
                        : : "r" (0x400) );
                }
  
 -              /*
 -               * We need to disable and flush the whole (L1 and L2) cache.
 -               * Let's do it in the safest possible way i.e. with
 -               * no memory access within the following sequence
 -               * including the stack.
 -               *
 -               * Note: fp is preserved to the stack explicitly prior doing
 -               * this since adding it to the clobber list is incompatible
 -               * with having CONFIG_FRAME_POINTER=y.
 -               */
 -              asm volatile(
 -              "str    fp, [sp, #-4]! \n\t"
 -              "mrc    p15, 0, r0, c1, c0, 0   @ get CR \n\t"
 -              "bic    r0, r0, #"__stringify(CR_C)" \n\t"
 -              "mcr    p15, 0, r0, c1, c0, 0   @ set CR \n\t"
 -              "isb    \n\t"
 -              "bl     v7_flush_dcache_all \n\t"
 -              "clrex  \n\t"
 -              "mrc    p15, 0, r0, c1, c0, 1   @ get AUXCR \n\t"
 -              "bic    r0, r0, #(1 << 6)       @ disable local coherency \n\t"
 -              "mcr    p15, 0, r0, c1, c0, 1   @ set AUXCR \n\t"
 -              "isb    \n\t"
 -              "dsb    \n\t"
 -              "ldr    fp, [sp], #4"
 -              : : : "r0","r1","r2","r3","r4","r5","r6","r7",
 -                    "r9","r10","lr","memory");
 +              v7_exit_coherency_flush(all);
  
                cci_disable_port_by_cpu(mpidr);
  
  
                arch_spin_unlock(&tc2_pm_lock);
  
 -              /*
 -               * We need to disable and flush only the L1 cache.
 -               * Let's do it in the safest possible way as above.
 -               */
 -              asm volatile(
 -              "str    fp, [sp, #-4]! \n\t"
 -              "mrc    p15, 0, r0, c1, c0, 0   @ get CR \n\t"
 -              "bic    r0, r0, #"__stringify(CR_C)" \n\t"
 -              "mcr    p15, 0, r0, c1, c0, 0   @ set CR \n\t"
 -              "isb    \n\t"
 -              "bl     v7_flush_dcache_louis \n\t"
 -              "clrex  \n\t"
 -              "mrc    p15, 0, r0, c1, c0, 1   @ get AUXCR \n\t"
 -              "bic    r0, r0, #(1 << 6)       @ disable local coherency \n\t"
 -              "mcr    p15, 0, r0, c1, c0, 1   @ set AUXCR \n\t"
 -              "isb    \n\t"
 -              "dsb    \n\t"
 -              "ldr    fp, [sp], #4"
 -              : : : "r0","r1","r2","r3","r4","r5","r6","r7",
 -                    "r9","r10","lr","memory");
 +              v7_exit_coherency_flush(louis);
        }
  
        __mcpm_cpu_down(cpu, cluster);
@@@ -267,7 -312,7 +268,7 @@@ static void __naked tc2_pm_power_up_set
  
  static int __init tc2_pm_init(void)
  {
-       int ret;
+       int ret, irq;
        void __iomem *scc;
        u32 a15_cluster_id, a7_cluster_id, sys_info;
        struct device_node *np;
        tc2_nr_cpus[a15_cluster_id] = (sys_info >> 16) & 0xf;
        tc2_nr_cpus[a7_cluster_id] = (sys_info >> 20) & 0xf;
  
+       irq = irq_of_parse_and_map(np, 0);
        /*
         * A subset of the SCC registers is also used to communicate
         * with the SPC (power controller). We need to be able to
         * drive it very early in the boot process to power up
         * processors, so we initialize the SPC driver here.
         */
-       ret = ve_spc_init(scc + SPC_BASE, a15_cluster_id);
+       ret = ve_spc_init(scc + SPC_BASE, a15_cluster_id, irq);
        if (ret)
                return ret;
  
diff --combined arch/blackfin/Kconfig
@@@ -52,9 -52,6 +52,9 @@@ config GENERIC_BU
  config ZONE_DMA
        def_bool y
  
 +config GENERIC_GPIO
 +      def_bool y
 +
  config FORCE_MAX_ZONEORDER
        int
        default "14"
@@@ -320,14 -317,6 +320,14 @@@ config BF53
        depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
        default y
  
 +config GPIO_ADI
 +      def_bool y
 +      depends on (BF51x || BF52x || BF53x || BF538 || BF539 || BF561)
 +
 +config PINCTRL
 +      def_bool y
 +      depends on BF54x || BF60x
 +
  config MEM_MT48LC64M4A2FB_7E
        bool
        depends on (BFIN533_STAMP)
@@@ -1440,7 -1429,6 +1440,6 @@@ source "drivers/cpufreq/Kconfig
  config BFIN_CPU_FREQ
        bool
        depends on CPU_FREQ
-       select CPU_FREQ_TABLE
        default y
  
  config CPU_VOLTAGE
diff --combined arch/x86/Kconfig
@@@ -123,7 -123,6 +123,7 @@@ config X8
        select COMPAT_OLD_SIGACTION if IA32_EMULATION
        select RTC_LIB
        select HAVE_DEBUG_STACKOVERFLOW
 +      select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64
  
  config INSTRUCTION_DECODER
        def_bool y
@@@ -255,10 -254,6 +255,6 @@@ config ARCH_HWEIGHT_CFLAG
        default "-fcall-saved-ecx -fcall-saved-edx" if X86_32
        default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" if X86_64
  
- config ARCH_CPU_PROBE_RELEASE
-       def_bool y
-       depends on HOTPLUG_CPU
  config ARCH_SUPPORTS_UPROBES
        def_bool y
  
@@@ -757,25 -752,20 +753,25 @@@ config DM
          BIOS code.
  
  config GART_IOMMU
 -      bool "GART IOMMU support" if EXPERT
 -      default y
 +      bool "Old AMD GART IOMMU support"
        select SWIOTLB
        depends on X86_64 && PCI && AMD_NB
        ---help---
 -        Support for full DMA access of devices with 32bit memory access only
 -        on systems with more than 3GB. This is usually needed for USB,
 -        sound, many IDE/SATA chipsets and some other devices.
 -        Provides a driver for the AMD Athlon64/Opteron/Turion/Sempron GART
 -        based hardware IOMMU and a software bounce buffer based IOMMU used
 -        on Intel systems and as fallback.
 -        The code is only active when needed (enough memory and limited
 -        device) unless CONFIG_IOMMU_DEBUG or iommu=force is specified
 -        too.
 +        Provides a driver for older AMD Athlon64/Opteron/Turion/Sempron
 +        GART based hardware IOMMUs.
 +
 +        The GART supports full DMA access for devices with 32-bit access
 +        limitations, on systems with more than 3 GB. This is usually needed
 +        for USB, sound, many IDE/SATA chipsets and some other devices.
 +
 +        Newer systems typically have a modern AMD IOMMU, supported via
 +        the CONFIG_AMD_IOMMU=y config option.
 +
 +        In normal configurations this driver is only active when needed:
 +        there's more than 3 GB of memory and the system contains a
 +        32-bit limited device.
 +
 +        If unsure, say Y.
  
  config CALGARY_IOMMU
        bool "IBM Calgary IOMMU support"
@@@ -831,16 -821,14 +827,16 @@@ config MAXSM
  config NR_CPUS
        int "Maximum number of CPUs" if SMP && !MAXSMP
        range 2 8 if SMP && X86_32 && !X86_BIGSMP
 -      range 2 512 if SMP && !MAXSMP
 +      range 2 512 if SMP && !MAXSMP && !CPUMASK_OFFSTACK
 +      range 2 8192 if SMP && !MAXSMP && CPUMASK_OFFSTACK && X86_64
        default "1" if !SMP
 -      default "4096" if MAXSMP
 +      default "8192" if MAXSMP
        default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000)
        default "8" if SMP
        ---help---
          This allows you to specify the maximum number of CPUs which this
 -        kernel will support.  The maximum supported value is 512 and the
 +        kernel will support.  If CPUMASK_OFFSTACK is enabled, the maximum
 +        supported value is 4096, otherwise the maximum value is 512.  The
          minimum value which makes sense is 2.
  
          This is purely to save memory - each supported CPU adds
@@@ -1602,7 -1590,7 +1598,7 @@@ config EFI_STU
            This kernel feature allows a bzImage to be loaded directly
          by EFI firmware without the use of a bootloader.
  
 -        See Documentation/x86/efi-stub.txt for more information.
 +        See Documentation/efi-stub.txt for more information.
  
  config SECCOMP
        def_bool y
  #include <asm/setup.h>
  #include <asm/uv/uv.h>
  #include <linux/mc146818rtc.h>
 -
  #include <asm/smpboot_hooks.h>
  #include <asm/i8259.h>
 -
  #include <asm/realmode.h>
 +#include <asm/misc.h>
  
  /* State of each CPU */
  DEFINE_PER_CPU(int, cpu_state) = { 0 };
  
- #ifdef CONFIG_HOTPLUG_CPU
- /*
-  * We need this for trampoline_base protection from concurrent accesses when
-  * off- and onlining cores wildly.
-  */
- static DEFINE_MUTEX(x86_cpu_hotplug_driver_mutex);
- void cpu_hotplug_driver_lock(void)
- {
-       mutex_lock(&x86_cpu_hotplug_driver_mutex);
- }
- void cpu_hotplug_driver_unlock(void)
- {
-       mutex_unlock(&x86_cpu_hotplug_driver_mutex);
- }
- ssize_t arch_cpu_probe(const char *buf, size_t count) { return -1; }
- ssize_t arch_cpu_release(const char *buf, size_t count) { return -1; }
- #endif
  /* Number of siblings per CPU package */
  int smp_num_siblings = 1;
  EXPORT_SYMBOL(smp_num_siblings);
@@@ -647,46 -627,22 +626,46 @@@ wakeup_secondary_cpu_via_init(int phys_
        return (send_status | accept_status);
  }
  
 +void smp_announce(void)
 +{
 +      int num_nodes = num_online_nodes();
 +
 +      printk(KERN_INFO "x86: Booted up %d node%s, %d CPUs\n",
 +             num_nodes, (num_nodes > 1 ? "s" : ""), num_online_cpus());
 +}
 +
  /* reduce the number of lines printed when booting a large cpu count system */
  static void announce_cpu(int cpu, int apicid)
  {
        static int current_node = -1;
        int node = early_cpu_to_node(cpu);
 -      int max_cpu_present = find_last_bit(cpumask_bits(cpu_present_mask), NR_CPUS);
 +      static int width, node_width;
 +
 +      if (!width)
 +              width = num_digits(num_possible_cpus()) + 1; /* + '#' sign */
 +
 +      if (!node_width)
 +              node_width = num_digits(num_possible_nodes()) + 1; /* + '#' */
 +
 +      if (cpu == 1)
 +              printk(KERN_INFO "x86: Booting SMP configuration:\n");
  
        if (system_state == SYSTEM_BOOTING) {
                if (node != current_node) {
                        if (current_node > (-1))
 -                              pr_cont(" OK\n");
 +                              pr_cont("\n");
                        current_node = node;
 -                      pr_info("Booting Node %3d, Processors ", node);
 +
 +                      printk(KERN_INFO ".... node %*s#%d, CPUs:  ",
 +                             node_width - num_digits(node), " ", node);
                }
 -              pr_cont(" #%4d%s", cpu, cpu == max_cpu_present ? " OK\n" : "");
 -              return;
 +
 +              /* Add padding for the BSP */
 +              if (cpu == 1)
 +                      pr_cont("%*s", width + 1, " ");
 +
 +              pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu);
 +
        } else
                pr_info("Booting Node %d Processor %d APIC 0x%x\n",
                        node, cpu, apicid);
diff --combined drivers/Kconfig
@@@ -166,6 -166,6 +166,8 @@@ source "drivers/reset/Kconfig
  
  source "drivers/fmc/Kconfig"
  
 +source "drivers/phy/Kconfig"
 +
+ source "drivers/powercap/Kconfig"
  endmenu
diff --combined drivers/Makefile
@@@ -8,8 -8,6 +8,8 @@@
  obj-y                         += irqchip/
  obj-y                         += bus/
  
 +obj-$(CONFIG_GENERIC_PHY)     += phy/
 +
  # GPIO must come after pinctrl as gpios may need to mux pins etc
  obj-y                         += pinctrl/
  obj-y                         += gpio/
@@@ -154,3 -152,4 +154,4 @@@ obj-$(CONFIG_VME_BUS)              += vme
  obj-$(CONFIG_IPACK_BUS)               += ipack/
  obj-$(CONFIG_NTB)             += ntb/
  obj-$(CONFIG_FMC)             += fmc/
+ obj-$(CONFIG_POWERCAP)                += powercap/
diff --combined drivers/acpi/Kconfig
@@@ -56,23 -56,6 +56,6 @@@ config ACPI_PROCF
  
          Say N to delete /proc/acpi/ files that have moved to /sys/
  
- config ACPI_PROCFS_POWER
-       bool "Deprecated power /proc/acpi directories"
-       depends on PROC_FS
-       help
-         For backwards compatibility, this option allows
-           deprecated power /proc/acpi/ directories to exist, even when
-           they have been replaced by functions in /sys.
-           The deprecated directories (and their replacements) include:
-         /proc/acpi/battery/* (/sys/class/power_supply/*)
-         /proc/acpi/ac_adapter/* (sys/class/power_supply/*)
-         This option has no effect on /proc/acpi/ directories
-         and functions, which do not yet exist in /sys
-         This option, together with the proc directories, will be
-         deleted in 2.6.39.
-         Say N to delete power /proc/acpi/ directories that have moved to /sys/
  config ACPI_EC_DEBUGFS
        tristate "EC read/write access through /sys/kernel/debug/ec"
        default n
@@@ -175,9 -158,10 +158,10 @@@ config ACPI_PROCESSO
  
          To compile this driver as a module, choose M here:
          the module will be called processor.
  config ACPI_IPMI
        tristate "IPMI"
-       depends on IPMI_SI && IPMI_HANDLER
+       depends on IPMI_SI
        default n
        help
          This driver enables the ACPI to access the BMC controller. And it
@@@ -372,25 -356,4 +356,25 @@@ config ACPI_BGR
  
  source "drivers/acpi/apei/Kconfig"
  
 +config ACPI_EXTLOG
 +      tristate "Extended Error Log support"
 +      depends on X86_MCE && X86_LOCAL_APIC
 +      select EFI
 +      select UEFI_CPER
 +      default n
 +      help
 +        Certain usages such as Predictive Failure Analysis (PFA) require
 +        more information about the error than what can be described in
 +        processor machine check banks. Most server processors log
 +        additional information about the error in processor uncore
 +        registers. Since the addresses and layout of these registers vary
 +        widely from one processor to another, system software cannot
 +        readily make use of them. To complicate matters further, some of
 +        the additional error information cannot be constructed without
 +        detailed knowledge about platform topology.
 +
 +        Enhanced MCA Logging allows firmware to provide additional error
 +        information to system software, synchronous with MCE or CMCI. This
 +        driver adds support for that functionality.
 +
  endif # ACPI
diff --combined drivers/acpi/Makefile
@@@ -47,7 -47,6 +47,6 @@@ acpi-y                                += sysfs.
  acpi-$(CONFIG_X86)            += acpi_cmos_rtc.o
  acpi-$(CONFIG_DEBUG_FS)               += debugfs.o
  acpi-$(CONFIG_ACPI_NUMA)      += numa.o
- acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
  ifdef CONFIG_ACPI_VIDEO
  acpi-y                                += video_detect.o
  endif
@@@ -82,5 -81,3 +81,5 @@@ processor-$(CONFIG_CPU_FREQ)  += process
  obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o
  
  obj-$(CONFIG_ACPI_APEI)               += apei/
 +
 +obj-$(CONFIG_ACPI_EXTLOG)     += acpi_extlog.o
@@@ -119,10 -119,17 +119,10 @@@ static struct dmi_system_id processor_p
   */
  static void acpi_safe_halt(void)
  {
 -      current_thread_info()->status &= ~TS_POLLING;
 -      /*
 -       * TS_POLLING-cleared state must be visible before we
 -       * test NEED_RESCHED:
 -       */
 -      smp_mb();
 -      if (!need_resched()) {
 +      if (!tif_need_resched()) {
                safe_halt();
                local_irq_disable();
        }
 -      current_thread_info()->status |= TS_POLLING;
  }
  
  #ifdef ARCH_APICTIMER_STOPS_ON_C3
@@@ -265,9 -272,6 +265,6 @@@ static void tsc_check_state(int state) 
  static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
  {
  
-       if (!pr)
-               return -EINVAL;
        if (!pr->pblk)
                return -ENODEV;
  
@@@ -730,11 -734,6 +727,11 @@@ static int acpi_idle_enter_c1(struct cp
        if (unlikely(!pr))
                return -EINVAL;
  
 +      if (cx->entry_method == ACPI_CSTATE_FFH) {
 +              if (current_set_polling_and_test())
 +                      return -EINVAL;
 +      }
 +
        lapic_timer_state_broadcast(pr, cx, 1);
        acpi_idle_do_entry(cx);
  
@@@ -788,9 -787,18 +785,9 @@@ static int acpi_idle_enter_simple(struc
        if (unlikely(!pr))
                return -EINVAL;
  
 -      if (cx->entry_method != ACPI_CSTATE_FFH) {
 -              current_thread_info()->status &= ~TS_POLLING;
 -              /*
 -               * TS_POLLING-cleared state must be visible before we test
 -               * NEED_RESCHED:
 -               */
 -              smp_mb();
 -
 -              if (unlikely(need_resched())) {
 -                      current_thread_info()->status |= TS_POLLING;
 +      if (cx->entry_method == ACPI_CSTATE_FFH) {
 +              if (current_set_polling_and_test())
                        return -EINVAL;
 -              }
        }
  
        /*
  
        sched_clock_idle_wakeup_event(0);
  
 -      if (cx->entry_method != ACPI_CSTATE_FFH)
 -              current_thread_info()->status |= TS_POLLING;
 -
        lapic_timer_state_broadcast(pr, cx, 0);
        return index;
  }
@@@ -844,9 -855,18 +841,9 @@@ static int acpi_idle_enter_bm(struct cp
                }
        }
  
 -      if (cx->entry_method != ACPI_CSTATE_FFH) {
 -              current_thread_info()->status &= ~TS_POLLING;
 -              /*
 -               * TS_POLLING-cleared state must be visible before we test
 -               * NEED_RESCHED:
 -               */
 -              smp_mb();
 -
 -              if (unlikely(need_resched())) {
 -                      current_thread_info()->status |= TS_POLLING;
 +      if (cx->entry_method == ACPI_CSTATE_FFH) {
 +              if (current_set_polling_and_test())
                        return -EINVAL;
 -              }
        }
  
        acpi_unlazy_tlb(smp_processor_id());
  
        sched_clock_idle_wakeup_event(0);
  
 -      if (cx->entry_method != ACPI_CSTATE_FFH)
 -              current_thread_info()->status |= TS_POLLING;
 -
        lapic_timer_state_broadcast(pr, cx, 0);
        return index;
  }
@@@ -1050,12 -1073,8 +1047,8 @@@ int acpi_processor_hotplug(struct acpi_
        if (disabled_by_idle_boot_param())
                return 0;
  
-       if (!pr)
-               return -EINVAL;
-       if (nocst) {
+       if (nocst)
                return -ENODEV;
-       }
  
        if (!pr->flags.power_setup_done)
                return -ENODEV;
@@@ -1082,9 -1101,6 +1075,6 @@@ int acpi_processor_cst_has_changed(stru
        if (disabled_by_idle_boot_param())
                return 0;
  
-       if (!pr)
-               return -EINVAL;
        if (nocst)
                return -ENODEV;
  
@@@ -1157,9 -1173,6 +1147,6 @@@ int acpi_processor_power_init(struct ac
                first_run++;
        }
  
-       if (!pr)
-               return -EINVAL;
        if (acpi_gbl_FADT.cst_control && !nocst) {
                status =
                    acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
  #include <linux/smp.h>
  #include <linux/init.h>
  #include <linux/io.h>
 +#include <linux/platform_device.h>
 +#include <linux/of.h>
 +#include <linux/of_address.h>
  
 -#include <mach/hardware.h>
 -#include <mach/platform.h>
  #include <asm/mach-types.h>
  #include <asm/hardware/icst.h>
  
 -static struct cpufreq_driver integrator_driver;
 +static void __iomem *cm_base;
 +/* The cpufreq driver only use the OSC register */
 +#define INTEGRATOR_HDR_OSC_OFFSET       0x08
 +#define INTEGRATOR_HDR_LOCK_OFFSET      0x14
  
 -#define CM_ID         __io_address(INTEGRATOR_HDR_ID)
 -#define CM_OSC        __io_address(INTEGRATOR_HDR_OSC)
 -#define CM_STAT __io_address(INTEGRATOR_HDR_STAT)
 -#define CM_LOCK __io_address(INTEGRATOR_HDR_LOCK)
 +static struct cpufreq_driver integrator_driver;
  
  static const struct icst_params lclk_params = {
        .ref            = 24000000,
@@@ -60,9 -59,7 +60,7 @@@ static int integrator_verify_policy(str
  {
        struct icst_vco vco;
  
-       cpufreq_verify_within_limits(policy, 
-                                    policy->cpuinfo.min_freq, 
-                                    policy->cpuinfo.max_freq);
+       cpufreq_verify_within_cpu_limits(policy);
  
        vco = icst_hz_to_vco(&cclk_params, policy->max * 1000);
        policy->max = icst_hz(&cclk_params, vco) / 1000;
        vco = icst_hz_to_vco(&cclk_params, policy->min * 1000);
        policy->min = icst_hz(&cclk_params, vco) / 1000;
  
-       cpufreq_verify_within_limits(policy, 
-                                    policy->cpuinfo.min_freq, 
-                                    policy->cpuinfo.max_freq);
+       cpufreq_verify_within_cpu_limits(policy);
        return 0;
  }
  
@@@ -101,7 -95,7 +96,7 @@@ static int integrator_set_target(struc
        BUG_ON(cpu != smp_processor_id());
  
        /* get current setting */
 -      cm_osc = __raw_readl(CM_OSC);
 +      cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
  
        if (machine_is_integrator()) {
                vco.s = (cm_osc >> 8) & 7;
  
        cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
  
 -      cm_osc = __raw_readl(CM_OSC);
 +      cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
  
        if (machine_is_integrator()) {
                cm_osc &= 0xfffff800;
        }
        cm_osc |= vco.v;
  
 -      __raw_writel(0xa05f, CM_LOCK);
 -      __raw_writel(cm_osc, CM_OSC);
 -      __raw_writel(0, CM_LOCK);
 +      __raw_writel(0xa05f, cm_base + INTEGRATOR_HDR_LOCK_OFFSET);
 +      __raw_writel(cm_osc, cm_base + INTEGRATOR_HDR_OSC_OFFSET);
 +      __raw_writel(0, cm_base + INTEGRATOR_HDR_LOCK_OFFSET);
  
        /*
         * Restore the CPUs allowed mask.
@@@ -166,7 -160,7 +161,7 @@@ static unsigned int integrator_get(unsi
        BUG_ON(cpu != smp_processor_id());
  
        /* detect memory etc. */
 -      cm_osc = __raw_readl(CM_OSC);
 +      cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
  
        if (machine_is_integrator()) {
                vco.s = (cm_osc >> 8) & 7;
@@@ -187,10 -181,9 +182,9 @@@ static int integrator_cpufreq_init(stru
  {
  
        /* set default policy and cpuinfo */
-       policy->cpuinfo.max_freq = 160000;
-       policy->cpuinfo.min_freq = 12000;
+       policy->max = policy->cpuinfo.max_freq = 160000;
+       policy->min = policy->cpuinfo.min_freq = 12000;
        policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */
-       policy->cur = policy->min = policy->max = integrator_get(policy->cpu);
  
        return 0;
  }
@@@ -203,43 -196,19 +197,43 @@@ static struct cpufreq_driver integrator
        .name           = "integrator",
  };
  
 -static int __init integrator_cpu_init(void)
 +static int __init integrator_cpufreq_probe(struct platform_device *pdev)
  {
 +      struct resource *res;
 +
 +      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 +        if (!res)
 +              return -ENODEV;
 +
 +      cm_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
 +      if (!cm_base)
 +              return -ENODEV;
 +
        return cpufreq_register_driver(&integrator_driver);
  }
  
 -static void __exit integrator_cpu_exit(void)
 +static void __exit integrator_cpufreq_remove(struct platform_device *pdev)
  {
        cpufreq_unregister_driver(&integrator_driver);
  }
  
 +static const struct of_device_id integrator_cpufreq_match[] = {
 +      { .compatible = "arm,core-module-integrator"},
 +      { },
 +};
 +
 +static struct platform_driver integrator_cpufreq_driver = {
 +      .driver = {
 +              .name = "integrator-cpufreq",
 +              .owner = THIS_MODULE,
 +              .of_match_table = integrator_cpufreq_match,
 +      },
 +      .remove = __exit_p(integrator_cpufreq_remove),
 +};
 +
 +module_platform_driver_probe(integrator_cpufreq_driver,
 +                           integrator_cpufreq_probe);
 +
  MODULE_AUTHOR ("Russell M. King");
  MODULE_DESCRIPTION ("cpufreq driver for ARM Integrator CPUs");
  MODULE_LICENSE ("GPL");
 -
 -module_init(integrator_cpu_init);
 -module_exit(integrator_cpu_exit);
@@@ -28,7 -28,6 +28,7 @@@
  #include <linux/cpufreq.h>
  #include <linux/timer.h>
  #include <linux/module.h>
 +#include <linux/of_address.h>
  
  #include <asm/hw_irq.h>
  #include <asm/io.h>
@@@ -52,8 -51,6 +52,6 @@@
  static void __iomem *sdcpwr_mapbase;
  static void __iomem *sdcasr_mapbase;
  
- static DEFINE_MUTEX(pas_switch_mutex);
  /* Current astate, is used when waking up from power savings on
   * one core, in case the other core has switched states during
   * the idle time.
@@@ -70,11 -67,6 +68,6 @@@ static struct cpufreq_frequency_table p
        {0,     CPUFREQ_TABLE_END},
  };
  
- static struct freq_attr *pas_cpu_freqs_attr[] = {
-       &cpufreq_freq_attr_scaling_available_freqs,
-       NULL,
- };
  /*
   * hardware specific functions
   */
@@@ -210,22 -202,13 +203,13 @@@ static int pas_cpufreq_cpu_init(struct 
                pr_debug("%d: %d\n", i, pas_freqs[i].frequency);
        }
  
-       policy->cpuinfo.transition_latency = get_gizmo_latency();
        cur_astate = get_cur_astate(policy->cpu);
        pr_debug("current astate is at %d\n",cur_astate);
  
        policy->cur = pas_freqs[cur_astate].frequency;
-       cpumask_copy(policy->cpus, cpu_online_mask);
        ppc_proc_freq = policy->cur * 1000ul;
  
-       cpufreq_frequency_table_get_attr(pas_freqs, policy->cpu);
-       /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max
-        * are set correctly
-        */
-       return cpufreq_frequency_table_cpuinfo(policy, pas_freqs);
+       return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency());
  
  out_unmap_sdcpwr:
        iounmap(sdcpwr_mapbase);
@@@ -254,31 -237,11 +238,11 @@@ static int pas_cpufreq_cpu_exit(struct 
        return 0;
  }
  
- static int pas_cpufreq_verify(struct cpufreq_policy *policy)
- {
-       return cpufreq_frequency_table_verify(policy, pas_freqs);
- }
  static int pas_cpufreq_target(struct cpufreq_policy *policy,
-                             unsigned int target_freq,
-                             unsigned int relation)
+                             unsigned int pas_astate_new)
  {
-       struct cpufreq_freqs freqs;
-       int pas_astate_new;
        int i;
  
-       cpufreq_frequency_table_target(policy,
-                                      pas_freqs,
-                                      target_freq,
-                                      relation,
-                                      &pas_astate_new);
-       freqs.old = policy->cur;
-       freqs.new = pas_freqs[pas_astate_new].frequency;
-       mutex_lock(&pas_switch_mutex);
-       cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
        pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n",
                 policy->cpu,
                 pas_freqs[pas_astate_new].frequency,
        for_each_online_cpu(i)
                set_astate(i, pas_astate_new);
  
-       cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
-       mutex_unlock(&pas_switch_mutex);
-       ppc_proc_freq = freqs.new * 1000ul;
+       ppc_proc_freq = pas_freqs[pas_astate_new].frequency * 1000ul;
        return 0;
  }
  
@@@ -301,9 -261,9 +262,9 @@@ static struct cpufreq_driver pas_cpufre
        .flags          = CPUFREQ_CONST_LOOPS,
        .init           = pas_cpufreq_cpu_init,
        .exit           = pas_cpufreq_cpu_exit,
-       .verify         = pas_cpufreq_verify,
-       .target         = pas_cpufreq_target,
-       .attr           = pas_cpu_freqs_attr,
+       .verify         = cpufreq_generic_frequency_table_verify,
+       .target_index   = pas_cpufreq_target,
+       .attr           = cpufreq_generic_attr,
  };
  
  /*
@@@ -2,9 -2,20 +2,20 @@@
  # ARM CPU Idle drivers
  #
  
+ config ARM_BIG_LITTLE_CPUIDLE
+       bool "Support for ARM big.LITTLE processors"
+       depends on ARCH_VEXPRESS_TC2_PM
+       select ARM_CPU_SUSPEND
+       select CPU_IDLE_MULTIPLE_DRIVERS
+       help
+         Select this option to enable CPU idle driver for big.LITTLE based
+         ARM systems. Driver manages CPUs coordination through MCPM and
+         define different C-states for little and big cores through the
+         multiple CPU idle drivers infrastructure.
  config ARM_HIGHBANK_CPUIDLE
        bool "CPU Idle Driver for Calxeda processors"
 -      depends on ARCH_HIGHBANK
 +      depends on ARM_PSCI
        select ARM_CPU_SUSPEND
        help
          Select this to enable cpuidle on Calxeda processors.
@@@ -27,13 -38,9 +38,9 @@@ config ARM_U8500_CPUIDL
        help
          Select this to enable cpuidle for ST-E u8500 processors
  
- config CPU_IDLE_BIG_LITTLE
-       bool "Support for ARM big.LITTLE processors"
-       depends on ARCH_VEXPRESS_TC2_PM
-       select ARM_CPU_SUSPEND
-       select CPU_IDLE_MULTIPLE_DRIVERS
+ config ARM_AT91_CPUIDLE
+       bool "Cpu Idle Driver for the AT91 processors"
+       default y
+       depends on ARCH_AT91
        help
-         Select this option to enable CPU idle driver for big.LITTLE based
-         ARM systems. Driver manages CPUs coordination through MCPM and
-         define different C-states for little and big cores through the
-         multiple CPU idle drivers infrastructure.
+         Select this to enable cpuidle for AT91 processors
@@@ -123,7 -123,7 +123,7 @@@ static struct cpuidle_state *cpuidle_st
   * which is also the index into the MWAIT hint array.
   * Thus C0 is a dummy.
   */
- static struct cpuidle_state nehalem_cstates[CPUIDLE_STATE_MAX] = {
+ static struct cpuidle_state nehalem_cstates[] __initdata = {
        {
                .name = "C1-NHM",
                .desc = "MWAIT 0x00",
                .enter = NULL }
  };
  
- static struct cpuidle_state snb_cstates[CPUIDLE_STATE_MAX] = {
+ static struct cpuidle_state snb_cstates[] __initdata = {
        {
                .name = "C1-SNB",
                .desc = "MWAIT 0x00",
                .enter = NULL }
  };
  
- static struct cpuidle_state ivb_cstates[CPUIDLE_STATE_MAX] = {
+ static struct cpuidle_state ivb_cstates[] __initdata = {
        {
                .name = "C1-IVB",
                .desc = "MWAIT 0x00",
                .enter = NULL }
  };
  
- static struct cpuidle_state hsw_cstates[CPUIDLE_STATE_MAX] = {
+ static struct cpuidle_state hsw_cstates[] __initdata = {
        {
                .name = "C1-HSW",
                .desc = "MWAIT 0x00",
                .enter = NULL }
  };
  
- static struct cpuidle_state atom_cstates[CPUIDLE_STATE_MAX] = {
+ static struct cpuidle_state atom_cstates[] __initdata = {
        {
                .name = "C1E-ATM",
                .desc = "MWAIT 0x00",
@@@ -359,7 -359,7 +359,7 @@@ static int intel_idle(struct cpuidle_de
        if (!(lapic_timer_reliable_states & (1 << (cstate))))
                clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
  
 -      if (!need_resched()) {
 +      if (!current_set_polling_and_test()) {
  
                __monitor((void *)&current_thread_info()->flags, 0, 0);
                smp_mb();
@@@ -390,7 -390,7 +390,7 @@@ static int cpu_hotplug_notify(struct no
        int hotcpu = (unsigned long)hcpu;
        struct cpuidle_device *dev;
  
-       switch (action & 0xf) {
+       switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_ONLINE:
  
                if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE)
@@@ -490,7 -490,7 +490,7 @@@ MODULE_DEVICE_TABLE(x86cpu, intel_idle_
  /*
   * intel_idle_probe()
   */
- static int intel_idle_probe(void)
+ static int __init intel_idle_probe(void)
  {
        unsigned int eax, ebx, ecx;
        const struct x86_cpu_id *id;
@@@ -558,7 -558,7 +558,7 @@@ static void intel_idle_cpuidle_devices_
   * intel_idle_cpuidle_driver_init()
   * allocate, initialize cpuidle_states
   */
- static int intel_idle_cpuidle_driver_init(void)
+ static int __init intel_idle_cpuidle_driver_init(void)
  {
        int cstate;
        struct cpuidle_driver *drv = &intel_idle_driver;
@@@ -628,7 -628,7 +628,7 @@@ static int intel_idle_cpu_init(int cpu
                int num_substates, mwait_hint, mwait_cstate, mwait_substate;
  
                if (cpuidle_state_table[cstate].enter == NULL)
-                       continue;
+                       break;
  
                if (cstate + 1 > max_cstate) {
                        printk(PREFIX "max_cstate %d reached\n", max_cstate);
@@@ -552,8 -552,9 +552,8 @@@ static void __ref enable_slot(struct ac
        struct acpiphp_func *func;
        int max, pass;
        LIST_HEAD(add_list);
 -      int nr_found;
  
 -      nr_found = acpiphp_rescan_slot(slot);
 +      acpiphp_rescan_slot(slot);
        max = acpiphp_max_busnr(bus);
        for (pass = 0; pass < 2; pass++) {
                list_for_each_entry(dev, &bus->devices, bus_list) {
                }
        }
        __pci_bus_assign_resources(bus, &add_list, NULL);
 -      /* Nothing more to do here if there are no new devices on this bus. */
 -      if (!nr_found && (slot->flags & SLOT_ENABLED))
 -              return;
  
        acpiphp_sanitize_bus(bus);
        acpiphp_set_hpp_values(bus);
@@@ -871,21 -875,17 +871,17 @@@ static void hotplug_event(acpi_handle h
                put_bridge(bridge);
  }
  
- static void hotplug_event_work(struct work_struct *work)
+ static void hotplug_event_work(void *data, u32 type)
  {
-       struct acpiphp_context *context;
-       struct acpi_hp_work *hp_work;
+       struct acpiphp_context *context = data;
+       acpi_handle handle = context->handle;
  
-       hp_work = container_of(work, struct acpi_hp_work, work);
-       context = hp_work->context;
        acpi_scan_lock_acquire();
  
-       hotplug_event(hp_work->handle, hp_work->type, context);
+       hotplug_event(handle, type, context);
  
        acpi_scan_lock_release();
-       acpi_evaluate_hotplug_ost(hp_work->handle, hp_work->type,
-                                 ACPI_OST_SC_SUCCESS, NULL);
-       kfree(hp_work); /* allocated in handle_hotplug_event() */
+       acpi_evaluate_hotplug_ost(handle, type, ACPI_OST_SC_SUCCESS, NULL);
        put_bridge(context->func.parent);
  }
  
@@@ -936,10 -936,10 +932,10 @@@ static void handle_hotplug_event(acpi_h
  
        mutex_lock(&acpiphp_context_lock);
        context = acpiphp_get_context(handle);
-       if (context) {
+       if (context && !WARN_ON(context->handle != handle)) {
                get_bridge(context->func.parent);
                acpiphp_put_context(context);
-               alloc_acpi_hp_work(handle, type, context, hotplug_event_work);
+               acpi_hotplug_execute(hotplug_event_work, context, type);
                mutex_unlock(&acpiphp_context_lock);
                return;
        }
@@@ -23,7 -23,7 +23,7 @@@
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  
 -#define TPACPI_VERSION "0.24"
 +#define TPACPI_VERSION "0.25"
  #define TPACPI_SYSFS_VERSION 0x020700
  
  /*
@@@ -88,7 -88,6 +88,7 @@@
  
  #include <linux/pci_ids.h>
  
 +#include <linux/thinkpad_acpi.h>
  
  /* ThinkPad CMOS commands */
  #define TP_CMOS_VOLUME_DOWN   0
@@@ -701,6 -700,14 +701,14 @@@ static void __init drv_acpi_handle_init
  static acpi_status __init tpacpi_acpi_handle_locate_callback(acpi_handle handle,
                        u32 level, void *context, void **return_value)
  {
+       struct acpi_device *dev;
+       if (!strcmp(context, "video")) {
+               if (acpi_bus_get_device(handle, &dev))
+                       return AE_OK;
+               if (strcmp(ACPI_VIDEO_HID, acpi_device_hid(dev)))
+                       return AE_OK;
+       }
        *(acpi_handle *)return_value = handle;
  
        return AE_CTRL_TERMINATE;
@@@ -713,10 -720,10 +721,10 @@@ static void __init tpacpi_acpi_handle_l
        acpi_status status;
        acpi_handle device_found;
  
-       BUG_ON(!name || !hid || !handle);
+       BUG_ON(!name || !handle);
        vdbg_printk(TPACPI_DBG_INIT,
                        "trying to locate ACPI handle for %s, using HID %s\n",
-                       name, hid);
+                       name, hid ? hid : "NULL");
  
        memset(&device_found, 0, sizeof(device_found));
        status = acpi_get_devices(hid, tpacpi_acpi_handle_locate_callback,
@@@ -6091,19 -6098,28 +6099,28 @@@ static int __init tpacpi_query_bcl_leve
  {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *obj;
+       struct acpi_device *device, *child;
        int rc;
  
-       if (ACPI_SUCCESS(acpi_evaluate_object(handle, "_BCL", NULL, &buffer))) {
+       if (acpi_bus_get_device(handle, &device))
+               return 0;
+       rc = 0;
+       list_for_each_entry(child, &device->children, node) {
+               acpi_status status = acpi_evaluate_object(child->handle, "_BCL",
+                                                         NULL, &buffer);
+               if (ACPI_FAILURE(status))
+                       continue;
                obj = (union acpi_object *)buffer.pointer;
                if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
                        pr_err("Unknown _BCL data, please report this to %s\n",
-                              TPACPI_MAIL);
+                               TPACPI_MAIL);
                        rc = 0;
                } else {
                        rc = obj->package.count;
                }
-       } else {
-               return 0;
+               break;
        }
  
        kfree(buffer.pointer);
@@@ -6119,7 -6135,7 +6136,7 @@@ static unsigned int __init tpacpi_check
        acpi_handle video_device;
        int bcl_levels = 0;
  
-       tpacpi_acpi_handle_locate("video", ACPI_VIDEO_HID, &video_device);
+       tpacpi_acpi_handle_locate("video", NULL, &video_device);
        if (video_device)
                bcl_levels = tpacpi_query_bcl_levels(video_device);
  
@@@ -8351,91 -8367,6 +8368,91 @@@ static struct ibm_struct fan_driver_dat
        .resume = fan_resume,
  };
  
 +/*************************************************************************
 + * Mute LED subdriver
 + */
 +
 +
 +struct tp_led_table {
 +      acpi_string name;
 +      int on_value;
 +      int off_value;
 +      int state;
 +};
 +
 +static struct tp_led_table led_tables[] = {
 +      [TPACPI_LED_MUTE] = {
 +              .name = "SSMS",
 +              .on_value = 1,
 +              .off_value = 0,
 +      },
 +      [TPACPI_LED_MICMUTE] = {
 +              .name = "MMTS",
 +              .on_value = 2,
 +              .off_value = 0,
 +      },
 +};
 +
 +static int mute_led_on_off(struct tp_led_table *t, bool state)
 +{
 +      acpi_handle temp;
 +      int output;
 +
 +      if (!ACPI_SUCCESS(acpi_get_handle(hkey_handle, t->name, &temp))) {
 +              pr_warn("Thinkpad ACPI has no %s interface.\n", t->name);
 +              return -EIO;
 +      }
 +
 +      if (!acpi_evalf(hkey_handle, &output, t->name, "dd",
 +                      state ? t->on_value : t->off_value))
 +              return -EIO;
 +
 +      t->state = state;
 +      return state;
 +}
 +
 +int tpacpi_led_set(int whichled, bool on)
 +{
 +      struct tp_led_table *t;
 +
 +      if (whichled < 0 || whichled >= TPACPI_LED_MAX)
 +              return -EINVAL;
 +
 +      t = &led_tables[whichled];
 +      if (t->state < 0 || t->state == on)
 +              return t->state;
 +      return mute_led_on_off(t, on);
 +}
 +EXPORT_SYMBOL_GPL(tpacpi_led_set);
 +
 +static int mute_led_init(struct ibm_init_struct *iibm)
 +{
 +      acpi_handle temp;
 +      int i;
 +
 +      for (i = 0; i < TPACPI_LED_MAX; i++) {
 +              struct tp_led_table *t = &led_tables[i];
 +              if (ACPI_SUCCESS(acpi_get_handle(hkey_handle, t->name, &temp)))
 +                      mute_led_on_off(t, false);
 +              else
 +                      t->state = -ENODEV;
 +      }
 +      return 0;
 +}
 +
 +static void mute_led_exit(void)
 +{
 +      int i;
 +
 +      for (i = 0; i < TPACPI_LED_MAX; i++)
 +              tpacpi_led_set(i, false);
 +}
 +
 +static struct ibm_struct mute_led_driver_data = {
 +      .name = "mute_led",
 +      .exit = mute_led_exit,
 +};
 +
  /****************************************************************************
   ****************************************************************************
   *
@@@ -8854,10 -8785,6 +8871,10 @@@ static struct ibm_init_struct ibms_init
                .init = fan_init,
                .data = &fan_driver_data,
        },
 +      {
 +              .init = mute_led_init,
 +              .data = &mute_led_driver_data,
 +      },
  };
  
  static int __init set_ibm_param(const char *val, struct kernel_param *kp)
diff --combined drivers/spi/spi.c
@@@ -39,9 -39,6 +39,9 @@@
  #include <linux/ioport.h>
  #include <linux/acpi.h>
  
 +#define CREATE_TRACE_POINTS
 +#include <trace/events/spi.h>
 +
  static void spidev_release(struct device *dev)
  {
        struct spi_device       *spi = to_spi_device(dev);
@@@ -61,13 -58,11 +61,13 @@@ modalias_show(struct device *dev, struc
  
        return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias);
  }
 +static DEVICE_ATTR_RO(modalias);
  
 -static struct device_attribute spi_dev_attrs[] = {
 -      __ATTR_RO(modalias),
 -      __ATTR_NULL,
 +static struct attribute *spi_dev_attrs[] = {
 +      &dev_attr_modalias.attr,
 +      NULL,
  };
 +ATTRIBUTE_GROUPS(spi_dev);
  
  /* modalias support makes "modprobe $MODALIAS" new-style hotplug work,
   * and the sysfs version makes coldplug work too.
@@@ -234,7 -229,7 +234,7 @@@ static const struct dev_pm_ops spi_pm 
  
  struct bus_type spi_bus_type = {
        .name           = "spi",
 -      .dev_attrs      = spi_dev_attrs,
 +      .dev_groups     = spi_dev_groups,
        .match          = spi_match_device,
        .uevent         = spi_uevent,
        .pm             = &spi_pm,
@@@ -245,15 -240,27 +245,27 @@@ EXPORT_SYMBOL_GPL(spi_bus_type)
  static int spi_drv_probe(struct device *dev)
  {
        const struct spi_driver         *sdrv = to_spi_driver(dev->driver);
+       struct spi_device               *spi = to_spi_device(dev);
+       int ret;
+       acpi_dev_pm_attach(&spi->dev, true);
+       ret = sdrv->probe(spi);
+       if (ret)
+               acpi_dev_pm_detach(&spi->dev, true);
  
-       return sdrv->probe(to_spi_device(dev));
+       return ret;
  }
  
  static int spi_drv_remove(struct device *dev)
  {
        const struct spi_driver         *sdrv = to_spi_driver(dev->driver);
+       struct spi_device               *spi = to_spi_device(dev);
+       int ret;
+       ret = sdrv->remove(spi);
+       acpi_dev_pm_detach(&spi->dev, true);
  
-       return sdrv->remove(to_spi_device(dev));
+       return ret;
  }
  
  static void spi_drv_shutdown(struct device *dev)
@@@ -328,7 -335,7 +340,7 @@@ struct spi_device *spi_alloc_device(str
        if (!spi_master_get(master))
                return NULL;
  
 -      spi = kzalloc(sizeof *spi, GFP_KERNEL);
 +      spi = kzalloc(sizeof(*spi), GFP_KERNEL);
        if (!spi) {
                dev_err(dev, "cannot alloc spi_device\n");
                spi_master_put(master);
@@@ -528,95 -535,6 +540,95 @@@ int spi_register_board_info(struct spi_
  
  /*-------------------------------------------------------------------------*/
  
 +static void spi_set_cs(struct spi_device *spi, bool enable)
 +{
 +      if (spi->mode & SPI_CS_HIGH)
 +              enable = !enable;
 +
 +      if (spi->cs_gpio >= 0)
 +              gpio_set_value(spi->cs_gpio, !enable);
 +      else if (spi->master->set_cs)
 +              spi->master->set_cs(spi, !enable);
 +}
 +
 +/*
 + * spi_transfer_one_message - Default implementation of transfer_one_message()
 + *
 + * This is a standard implementation of transfer_one_message() for
 + * drivers which impelment a transfer_one() operation.  It provides
 + * standard handling of delays and chip select management.
 + */
 +static int spi_transfer_one_message(struct spi_master *master,
 +                                  struct spi_message *msg)
 +{
 +      struct spi_transfer *xfer;
 +      bool cur_cs = true;
 +      bool keep_cs = false;
 +      int ret = 0;
 +
 +      spi_set_cs(msg->spi, true);
 +
 +      list_for_each_entry(xfer, &msg->transfers, transfer_list) {
 +              trace_spi_transfer_start(msg, xfer);
 +
 +              INIT_COMPLETION(master->xfer_completion);
 +
 +              ret = master->transfer_one(master, msg->spi, xfer);
 +              if (ret < 0) {
 +                      dev_err(&msg->spi->dev,
 +                              "SPI transfer failed: %d\n", ret);
 +                      goto out;
 +              }
 +
 +              if (ret > 0)
 +                      wait_for_completion(&master->xfer_completion);
 +
 +              trace_spi_transfer_stop(msg, xfer);
 +
 +              if (msg->status != -EINPROGRESS)
 +                      goto out;
 +
 +              if (xfer->delay_usecs)
 +                      udelay(xfer->delay_usecs);
 +
 +              if (xfer->cs_change) {
 +                      if (list_is_last(&xfer->transfer_list,
 +                                       &msg->transfers)) {
 +                              keep_cs = true;
 +                      } else {
 +                              cur_cs = !cur_cs;
 +                              spi_set_cs(msg->spi, cur_cs);
 +                      }
 +              }
 +
 +              msg->actual_length += xfer->len;
 +      }
 +
 +out:
 +      if (ret != 0 || !keep_cs)
 +              spi_set_cs(msg->spi, false);
 +
 +      if (msg->status == -EINPROGRESS)
 +              msg->status = ret;
 +
 +      spi_finalize_current_message(master);
 +
 +      return ret;
 +}
 +
 +/**
 + * spi_finalize_current_transfer - report completion of a transfer
 + *
 + * Called by SPI drivers using the core transfer_one_message()
 + * implementation to notify it that the current interrupt driven
 + * transfer has finised and the next one may be scheduled.
 + */
 +void spi_finalize_current_transfer(struct spi_master *master)
 +{
 +      complete(&master->xfer_completion);
 +}
 +EXPORT_SYMBOL_GPL(spi_finalize_current_transfer);
 +
  /**
   * spi_pump_messages - kthread work function which processes spi message queue
   * @work: pointer to kthread work struct contained in the master struct
@@@ -651,7 -569,6 +663,7 @@@ static void spi_pump_messages(struct kt
                        pm_runtime_mark_last_busy(master->dev.parent);
                        pm_runtime_put_autosuspend(master->dev.parent);
                }
 +              trace_spi_master_idle(master);
                return;
        }
  
                }
        }
  
 +      if (!was_busy)
 +              trace_spi_master_busy(master);
 +
        if (!was_busy && master->prepare_transfer_hardware) {
                ret = master->prepare_transfer_hardware(master);
                if (ret) {
                }
        }
  
 +      trace_spi_message_start(master->cur_msg);
 +
 +      if (master->prepare_message) {
 +              ret = master->prepare_message(master, master->cur_msg);
 +              if (ret) {
 +                      dev_err(&master->dev,
 +                              "failed to prepare message: %d\n", ret);
 +                      master->cur_msg->status = ret;
 +                      spi_finalize_current_message(master);
 +                      return;
 +              }
 +              master->cur_msg_prepared = true;
 +      }
 +
        ret = master->transfer_one_message(master, master->cur_msg);
        if (ret) {
                dev_err(&master->dev,
@@@ -790,7 -690,6 +802,7 @@@ void spi_finalize_current_message(struc
  {
        struct spi_message *mesg;
        unsigned long flags;
 +      int ret;
  
        spin_lock_irqsave(&master->queue_lock, flags);
        mesg = master->cur_msg;
        queue_kthread_work(&master->kworker, &master->pump_messages);
        spin_unlock_irqrestore(&master->queue_lock, flags);
  
 +      if (master->cur_msg_prepared && master->unprepare_message) {
 +              ret = master->unprepare_message(master, mesg);
 +              if (ret) {
 +                      dev_err(&master->dev,
 +                              "failed to unprepare message: %d\n", ret);
 +              }
 +      }
 +      master->cur_msg_prepared = false;
 +
        mesg->state = NULL;
        if (mesg->complete)
                mesg->complete(mesg->context);
 +
 +      trace_spi_message_done(mesg);
  }
  EXPORT_SYMBOL_GPL(spi_finalize_current_message);
  
@@@ -927,8 -815,6 +939,8 @@@ static int spi_master_initialize_queue(
  
        master->queued = true;
        master->transfer = spi_queued_transfer;
 +      if (!master->transfer_one_message)
 +              master->transfer_one_message = spi_transfer_one_message;
  
        /* Initialize and start queue */
        ret = spi_init_queue(master);
@@@ -964,8 -850,10 +976,8 @@@ static void of_register_spi_devices(str
  {
        struct spi_device *spi;
        struct device_node *nc;
 -      const __be32 *prop;
 -      char modalias[SPI_NAME_SIZE + 4];
        int rc;
 -      int len;
 +      u32 value;
  
        if (!master->dev.of_node)
                return;
                }
  
                /* Device address */
 -              prop = of_get_property(nc, "reg", &len);
 -              if (!prop || len < sizeof(*prop)) {
 -                      dev_err(&master->dev, "%s has no 'reg' property\n",
 -                              nc->full_name);
 +              rc = of_property_read_u32(nc, "reg", &value);
 +              if (rc) {
 +                      dev_err(&master->dev, "%s has no valid 'reg' property (%d)\n",
 +                              nc->full_name, rc);
                        spi_dev_put(spi);
                        continue;
                }
 -              spi->chip_select = be32_to_cpup(prop);
 +              spi->chip_select = value;
  
                /* Mode (clock phase/polarity/etc.) */
                if (of_find_property(nc, "spi-cpha", NULL))
                        spi->mode |= SPI_3WIRE;
  
                /* Device DUAL/QUAD mode */
 -              prop = of_get_property(nc, "spi-tx-bus-width", &len);
 -              if (prop && len == sizeof(*prop)) {
 -                      switch (be32_to_cpup(prop)) {
 -                      case SPI_NBITS_SINGLE:
 +              if (!of_property_read_u32(nc, "spi-tx-bus-width", &value)) {
 +                      switch (value) {
 +                      case 1:
                                break;
 -                      case SPI_NBITS_DUAL:
 +                      case 2:
                                spi->mode |= SPI_TX_DUAL;
                                break;
 -                      case SPI_NBITS_QUAD:
 +                      case 4:
                                spi->mode |= SPI_TX_QUAD;
                                break;
                        default:
                                dev_err(&master->dev,
                                        "spi-tx-bus-width %d not supported\n",
 -                                      be32_to_cpup(prop));
 +                                      value);
                                spi_dev_put(spi);
                                continue;
                        }
                }
  
 -              prop = of_get_property(nc, "spi-rx-bus-width", &len);
 -              if (prop && len == sizeof(*prop)) {
 -                      switch (be32_to_cpup(prop)) {
 -                      case SPI_NBITS_SINGLE:
 +              if (!of_property_read_u32(nc, "spi-rx-bus-width", &value)) {
 +                      switch (value) {
 +                      case 1:
                                break;
 -                      case SPI_NBITS_DUAL:
 +                      case 2:
                                spi->mode |= SPI_RX_DUAL;
                                break;
 -                      case SPI_NBITS_QUAD:
 +                      case 4:
                                spi->mode |= SPI_RX_QUAD;
                                break;
                        default:
                                dev_err(&master->dev,
                                        "spi-rx-bus-width %d not supported\n",
 -                                      be32_to_cpup(prop));
 +                                      value);
                                spi_dev_put(spi);
                                continue;
                        }
                }
  
                /* Device speed */
 -              prop = of_get_property(nc, "spi-max-frequency", &len);
 -              if (!prop || len < sizeof(*prop)) {
 -                      dev_err(&master->dev, "%s has no 'spi-max-frequency' property\n",
 -                              nc->full_name);
 +              rc = of_property_read_u32(nc, "spi-max-frequency", &value);
 +              if (rc) {
 +                      dev_err(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
 +                              nc->full_name, rc);
                        spi_dev_put(spi);
                        continue;
                }
 -              spi->max_speed_hz = be32_to_cpup(prop);
 +              spi->max_speed_hz = value;
  
                /* IRQ */
                spi->irq = irq_of_parse_and_map(nc, 0);
                spi->dev.of_node = nc;
  
                /* Register the new device */
 -              snprintf(modalias, sizeof(modalias), "%s%s", SPI_MODULE_PREFIX,
 -                       spi->modalias);
 -              request_module(modalias);
 +              request_module("%s%s", SPI_MODULE_PREFIX, spi->modalias);
                rc = spi_add_device(spi);
                if (rc) {
                        dev_err(&master->dev, "spi_device register error %s\n",
@@@ -1145,8 -1037,10 +1157,10 @@@ static acpi_status acpi_spi_add_device(
                return AE_OK;
        }
  
 -      strlcpy(spi->modalias, dev_name(&adev->dev), sizeof(spi->modalias));
+       adev->power.flags.ignore_parent = true;
 +      strlcpy(spi->modalias, acpi_device_hid(adev), sizeof(spi->modalias));
        if (spi_add_device(spi)) {
+               adev->power.flags.ignore_parent = false;
                dev_err(&master->dev, "failed to add SPI device %s from ACPI\n",
                        dev_name(&adev->dev));
                spi_dev_put(spi);
@@@ -1217,7 -1111,7 +1231,7 @@@ struct spi_master *spi_alloc_master(str
        if (!dev)
                return NULL;
  
 -      master = kzalloc(size + sizeof *master, GFP_KERNEL);
 +      master = kzalloc(size + sizeof(*master), GFP_KERNEL);
        if (!master)
                return NULL;
  
@@@ -1242,7 -1136,7 +1256,7 @@@ static int of_spi_register_master(struc
                return 0;
  
        nb = of_gpio_named_count(np, "cs-gpios");
 -      master->num_chipselect = max(nb, (int)master->num_chipselect);
 +      master->num_chipselect = max_t(int, nb, master->num_chipselect);
  
        /* Return error only for an incorrectly formed cs-gpios property */
        if (nb == 0 || nb == -ENOENT)
@@@ -1329,7 -1223,6 +1343,7 @@@ int spi_register_master(struct spi_mast
        spin_lock_init(&master->bus_lock_spinlock);
        mutex_init(&master->bus_lock_mutex);
        master->bus_lock_flag = 0;
 +      init_completion(&master->xfer_completion);
  
        /* register the device, then userspace will see it.
         * registration fails if the bus ID is in use.
@@@ -1366,41 -1259,6 +1380,41 @@@ done
  }
  EXPORT_SYMBOL_GPL(spi_register_master);
  
 +static void devm_spi_unregister(struct device *dev, void *res)
 +{
 +      spi_unregister_master(*(struct spi_master **)res);
 +}
 +
 +/**
 + * dev_spi_register_master - register managed SPI master controller
 + * @dev:    device managing SPI master
 + * @master: initialized master, originally from spi_alloc_master()
 + * Context: can sleep
 + *
 + * Register a SPI device as with spi_register_master() which will
 + * automatically be unregister
 + */
 +int devm_spi_register_master(struct device *dev, struct spi_master *master)
 +{
 +      struct spi_master **ptr;
 +      int ret;
 +
 +      ptr = devres_alloc(devm_spi_unregister, sizeof(*ptr), GFP_KERNEL);
 +      if (!ptr)
 +              return -ENOMEM;
 +
 +      ret = spi_register_master(master);
 +      if (ret != 0) {
 +              *ptr = master;
 +              devres_add(dev, ptr);
 +      } else {
 +              devres_free(ptr);
 +      }
 +
 +      return ret;
 +}
 +EXPORT_SYMBOL_GPL(devm_spi_register_master);
 +
  static int __unregister(struct device *dev, void *null)
  {
        spi_unregister_device(to_spi_device(dev));
@@@ -1558,7 -1416,8 +1572,7 @@@ int spi_setup(struct spi_device *spi
        if (spi->master->setup)
                status = spi->master->setup(spi);
  
 -      dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s"
 -                              "%u bits/w, %u Hz max --> %d\n",
 +      dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s%u bits/w, %u Hz max --> %d\n",
                        (int) (spi->mode & (SPI_CPOL | SPI_CPHA)),
                        (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",
                        (spi->mode & SPI_LSB_FIRST) ? "lsb, " : "",
@@@ -1576,10 -1435,6 +1590,10 @@@ static int __spi_async(struct spi_devic
        struct spi_master *master = spi->master;
        struct spi_transfer *xfer;
  
 +      message->spi = spi;
 +
 +      trace_spi_message_submit(message);
 +
        if (list_empty(&message->transfers))
                return -EINVAL;
        if (!message->complete)
                }
        }
  
 -      message->spi = spi;
        message->status = -EINPROGRESS;
        return master->transfer(spi, message);
  }
@@@ -1920,7 -1776,7 +1934,7 @@@ int spi_bus_unlock(struct spi_master *m
  EXPORT_SYMBOL_GPL(spi_bus_unlock);
  
  /* portable code must never pass more than 32 bytes */
 -#define       SPI_BUFSIZ      max(32,SMP_CACHE_BYTES)
 +#define       SPI_BUFSIZ      max(32, SMP_CACHE_BYTES)
  
  static u8     *buf;
  
@@@ -1969,7 -1825,7 +1983,7 @@@ int spi_write_then_read(struct spi_devi
        }
  
        spi_message_init(&message);
 -      memset(x, 0, sizeof x);
 +      memset(x, 0, sizeof(x));
        if (n_tx) {
                x[0].len = n_tx;
                spi_message_add_tail(&x[0], &message);
diff --combined include/linux/acpi.h
@@@ -116,7 -116,7 +116,7 @@@ void acpi_numa_arch_fixup(void)
  
  #ifdef CONFIG_ACPI_HOTPLUG_CPU
  /* Arch dependent functions for cpu hotplug support */
- int acpi_map_lsapic(acpi_handle handle, int *pcpu);
+ int acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu);
  int acpi_unmap_lsapic(int cpu);
  #endif /* CONFIG_ACPI_HOTPLUG_CPU */
  
@@@ -311,7 -311,6 +311,7 @@@ struct acpi_osc_context 
  #define OSC_INVALID_REVISION_ERROR    8
  #define OSC_CAPABILITIES_MASK_ERROR   16
  
 +acpi_status acpi_str_to_uuid(char *str, u8 *uuid);
  acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
  
  /* platform-wide _OSC bits */
diff --combined include/linux/bitops.h
@@@ -4,20 -4,15 +4,23 @@@
  
  #ifdef        __KERNEL__
  #define BIT(nr)                       (1UL << (nr))
+ #define BIT_ULL(nr)           (1ULL << (nr))
  #define BIT_MASK(nr)          (1UL << ((nr) % BITS_PER_LONG))
  #define BIT_WORD(nr)          ((nr) / BITS_PER_LONG)
+ #define BIT_ULL_MASK(nr)      (1ULL << ((nr) % BITS_PER_LONG_LONG))
+ #define BIT_ULL_WORD(nr)      ((nr) / BITS_PER_LONG_LONG)
  #define BITS_PER_BYTE         8
  #define BITS_TO_LONGS(nr)     DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
  #endif
  
 +/*
 + * Create a contiguous bitmask starting at bit position @l and ending at
 + * position @h. For example
 + * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
 + */
 +#define GENMASK(h, l)         (((U32_C(1) << ((h) - (l) + 1)) - 1) << (l))
 +#define GENMASK_ULL(h, l)     (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l))
 +
  extern unsigned int __sw_hweight8(unsigned int w);
  extern unsigned int __sw_hweight16(unsigned int w);
  extern unsigned int __sw_hweight32(unsigned int w);
diff --combined include/linux/cpu.h
@@@ -18,7 -18,6 +18,7 @@@
  #include <linux/cpumask.h>
  
  struct device;
 +struct device_node;
  
  struct cpu {
        int node_id;            /* The node which contains the CPU */
@@@ -30,8 -29,6 +30,8 @@@ extern int register_cpu(struct cpu *cpu
  extern struct device *get_cpu_device(unsigned cpu);
  extern bool cpu_is_hotpluggable(unsigned cpu);
  extern bool arch_match_cpu_phys_id(int cpu, u64 phys_id);
 +extern bool arch_find_n_match_cpu_physical_id(struct device_node *cpun,
 +                                            int cpu, unsigned int *thread);
  
  extern int cpu_add_dev_attr(struct device_attribute *attr);
  extern void cpu_remove_dev_attr(struct device_attribute *attr);
@@@ -188,19 -185,6 +188,6 @@@ extern void cpu_hotplug_enable(void)
  void clear_tasks_mm_cpumask(int cpu);
  int cpu_down(unsigned int cpu);
  
- #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
- extern void cpu_hotplug_driver_lock(void);
- extern void cpu_hotplug_driver_unlock(void);
- #else
- static inline void cpu_hotplug_driver_lock(void)
- {
- }
- static inline void cpu_hotplug_driver_unlock(void)
- {
- }
- #endif
  #else         /* CONFIG_HOTPLUG_CPU */
  
  static inline void cpu_hotplug_begin(void) {}