]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 21:35:40 +0000 (14:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 21:35:40 +0000 (14:35 -0700)
Pull power management and ACPI updates from Rafael Wysocki:
 "This time the total number of ACPI commits is slightly greater than
  the number of cpufreq commits, but Viresh Kumar (who works on cpufreq)
  remains the most active patch submitter.

  To me, the most significant change is the addition of offline/online
  device operations to the driver core (with the Greg's blessing) and
  the related modifications of the ACPI core hotplug code.  Next are the
  freezer updates from Colin Cross that should make the freezing of
  tasks a bit less heavy weight.

  We also have a couple of regression fixes, a number of fixes for
  issues that have not been identified as regressions, two new drivers
  and a bunch of cleanups all over.

  Highlights:

   - Hotplug changes to support graceful hot-removal failures.

     It sometimes is necessary to fail device hot-removal operations
     gracefully if they cannot be carried out completely.  For example,
     if memory from a memory module being hot-removed has been allocated
     for the kernel's own use and cannot be moved elsewhere, it's
     desirable to fail the hot-removal operation in a graceful way
     rather than to crash the kernel, but currenty a success or a kernel
     crash are the only possible outcomes of an attempted memory
     hot-removal.  Needless to say, that is not a very attractive
     alternative and it had to be addressed.

     However, in order to make it work for memory, I first had to make
     it work for CPUs and for this purpose I needed to modify the ACPI
     processor driver.  It's been split into two parts, a resident one
     handling the low-level initialization/cleanup and a modular one
     playing the actual driver's role (but it binds to the CPU system
     device objects rather than to the ACPI device objects representing
     processors).  That's been sort of like a live brain surgery on a
     patient who's riding a bike.

     So this is a little scary, but since we found and fixed a couple of
     regressions it caused to happen during the early linux-next testing
     (a month ago), nobody has complained.

     As a bonus we remove some duplicated ACPI hotplug code, because the
     ACPI-based CPU hotplug is now going to use the common ACPI hotplug
     code.

   - Lighter weight freezing of tasks.

     These changes from Colin Cross and Mandeep Singh Baines are
     targeted at making the freezing of tasks a bit less heavy weight
     operation.  They reduce the number of tasks woken up every time
     during the freezing, by using the observation that the freezer
     simply doesn't need to wake up some of them and wait for them all
     to call refrigerator().  The time needed for the freezer to decide
     to report a failure is reduced too.

     Also reintroduced is the check causing a lockdep warining to
     trigger when try_to_freeze() is called with locks held (which is
     generally unsafe and shouldn't happen).

   - cpufreq updates

     First off, a commit from Srivatsa S Bhat fixes a resume regression
     introduced during the 3.10 cycle causing some cpufreq sysfs
     attributes to return wrong values to user space after resume.  The
     fix is kind of fresh, but also it's pretty obvious once Srivatsa
     has identified the root cause.

     Second, we have a new freqdomain_cpus sysfs attribute for the
     acpi-cpufreq driver to provide information previously available via
     related_cpus.  From Lan Tianyu.

     Finally, we fix a number of issues, mostly related to the
     CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean
     up some code.  The majority of changes from Viresh Kumar with bits
     from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia,
     Arnd Bergmann, and Tang Yuantian.

   - ACPICA update

     A usual bunch of updates from the ACPICA upstream.

     During the 3.4 cycle we introduced support for ACPI 5 extended
     sleep registers, but they are only supposed to be used if the
     HW-reduced mode bit is set in the FADT flags and the code attempted
     to use them without checking that bit.  That caused suspend/resume
     regressions to happen on some systems.  Fix from Lv Zheng causes
     those registers to be used only if the HW-reduced mode bit is set.

     Apart from this some other ACPICA bugs are fixed and code cleanups
     are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and
     Zhang Rui.

   - cpuidle updates

     New driver for Xilinx Zynq processors is added by Michal Simek.

     Multidriver support simplification, addition of some missing
     kerneldoc comments and Kconfig-related fixes come from Daniel
     Lezcano.

   - ACPI power management updates

     Changes to make suspend/resume work correctly in Xen guests from
     Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and
     cleanups and fixes of the ACPI device power state selection
     routine.

   - ACPI documentation updates

     Some previously missing pieces of ACPI documentation are added by
     Lv Zheng and Aaron Lu (hopefully, that will help people to
     uderstand how the ACPI subsystem works) and one outdated doc is
     updated by Hanjun Guo.

   - Assorted ACPI updates

     We finally nailed down the IA-64 issue that was the reason for
     reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers
     against objects having scan handlers"), so we can fix it and move
     the ACPI scan handler check added to the ACPI video driver back to
     the core.

     A mechanism for adding CMOS RTC address space handlers is
     introduced by Lan Tianyu to allow some EC-related breakage to be
     fixed on some systems.

     A spec-compliant implementation of acpi_os_get_timer() is added by
     Mika Westerberg.

     The evaluation of _STA is added to do_acpi_find_child() to avoid
     situations in which a pointer to a disabled device object is
     returned instead of an enabled one with the same _ADR value.  From
     Jeff Wu.

     Intel BayTrail PCH (Platform Controller Hub) support is added to
     the ACPI driver for Intel Low-Power Subsystems (LPSS) and that
     driver is modified to work around a couple of known BIOS issues.
     Changes from Mika Westerberg and Heikki Krogerus.

     The EC driver is fixed by Vasiliy Kulikov to use get_user() and
     put_user() instead of dereferencing user space pointers blindly.

     Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi
     Kani.

   - Assorted power management updates

     The "runtime idle" helper routine is changed to take the return
     values of the callbacks executed by it into account and to call
     rpm_suspend() if they return 0, which allows us to reduce the
     overall code bloat a bit (by dropping some code that's not
     necessary any more after that modification).

     The runtime PM documentation is updated by Alan Stern (to reflect
     the "runtime idle" behavior change).

     New trace points for PM QoS are added by Sahara
     (<keun-o.park@windriver.com>).

     PM QoS documentation is updated by Lan Tianyu.

     Code cleanups are made and minor issues are addressed by Bernie
     Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan.

   - devfreq updates

     New driver for the Exynos5-bus device from Abhilash Kesavan.

     Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham,
     Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun.

   - OMAP power management updates

     Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver
     updates from Andrii Tseglytskyi and Nishanth Menon."

* tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
  cpufreq: Fix cpufreq regression after suspend/resume
  ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state()
  PM / Sleep: Warn about system time after resume with pm_trace
  cpufreq: don't leave stale policy pointer in cdbs->cur_policy
  acpi-cpufreq: Add new sysfs attribute freqdomain_cpus
  cpufreq: make sure frequency transitions are serialized
  ACPI: implement acpi_os_get_timer() according the spec
  ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
  ACPI: Add CMOS RTC Operation Region handler support
  ACPI / processor: Drop unused variable from processor_perflib.c
  cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
  ...

22 files changed:
1  2 
Documentation/cpu-hotplug.txt
Documentation/kernel-parameters.txt
MAINTAINERS
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-tegra/Kconfig
arch/arm/plat-samsung/include/plat/cpu-freq-core.h
arch/cris/Kconfig
drivers/base/core.c
drivers/base/cpu.c
drivers/base/memory.c
drivers/base/platform.c
drivers/cpufreq/Kconfig.arm
drivers/cpufreq/Makefile
drivers/cpufreq/s3c24xx-cpufreq.c
drivers/cpuidle/Kconfig
drivers/gpio/gpio-langwell.c
drivers/mfd/db8500-prcmu.c
drivers/staging/android/binder.c
drivers/tty/serial/mfd.c
drivers/usb/core/port.c
fs/cifs/transport.c
include/linux/device.h

Simple merge
Simple merge
diff --cc MAINTAINERS
Simple merge
Simple merge
index 65c5ae6fa386ac34fa2ac3a5ab032e655ce1432f,5c0db065baa411f56722e17409968eb25b027aac..ef3a8da49b2d223616514c364e554f14add271d1
@@@ -60,10 -58,9 +58,9 @@@ config ARCH_TEGRA_3x_SO
  
  config ARCH_TEGRA_114_SOC
        bool "Enable support for Tegra114 family"
 -      select ARM_ARCH_TIMER
 +      select HAVE_ARM_ARCH_TIMER
        select ARM_GIC
        select ARM_L1_CACHE_SHIFT_6
-       select CPU_FREQ_TABLE if CPU_FREQ
        select CPU_V7
        select PINCTRL
        select PINCTRL_TEGRA114
Simple merge
Simple merge
index c377673320eda18e32c7eb25aa87e72e4deb12e6,1d110dc6f0c1f371ac262a9f6e352b5d626bf2fa..a16d20e389f0f2fead522d97edee5f3c66bc9112
@@@ -125,8 -102,20 +102,19 @@@ static ssize_t cpu_release_store(struc
  static DEVICE_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
  static DEVICE_ATTR(release, S_IWUSR, NULL, cpu_release_store);
  #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
 -
  #endif /* CONFIG_HOTPLUG_CPU */
  
+ struct bus_type cpu_subsys = {
+       .name = "cpu",
+       .dev_name = "cpu",
+       .match = cpu_subsys_match,
+ #ifdef CONFIG_HOTPLUG_CPU
+       .online = cpu_subsys_online,
+       .offline = cpu_subsys_offline,
+ #endif
+ };
+ EXPORT_SYMBOL_GPL(cpu_subsys);
  #ifdef CONFIG_KEXEC
  #include <linux/kexec.h>
  
@@@ -162,35 -151,8 +150,32 @@@ static ssize_t show_crash_notes_size(st
        return rc;
  }
  static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL);
 +
 +static struct attribute *crash_note_cpu_attrs[] = {
 +      &dev_attr_crash_notes.attr,
 +      &dev_attr_crash_notes_size.attr,
 +      NULL
 +};
 +
 +static struct attribute_group crash_note_cpu_attr_group = {
 +      .attrs = crash_note_cpu_attrs,
 +};
  #endif
  
- #endif
- #ifdef CONFIG_HOTPLUG_CPU
-       &hotplug_cpu_attr_group,
 +static const struct attribute_group *common_cpu_attr_groups[] = {
 +#ifdef CONFIG_KEXEC
 +      &crash_note_cpu_attr_group,
 +#endif
 +      NULL
 +};
 +
 +static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
 +#ifdef CONFIG_KEXEC
 +      &crash_note_cpu_attr_group,
 +#endif
 +      NULL
 +};
 +
  /*
   * Print cpu online, possible, present, and system maps
   */
index e315051cfeebbdb25a4420b7d3eaeb7d4d57b74f,4ebf97f99fae0f84fb7d8f28bc9a9bd513f7b5aa..2b7813ec6d02f31e842d181b61b01fa6be6f4b9d
@@@ -493,41 -595,6 +541,42 @@@ struct memory_block *find_memory_block(
        return find_memory_block_hinted(section, NULL);
  }
  
 +static struct attribute *memory_memblk_attrs[] = {
 +      &dev_attr_phys_index.attr,
 +      &dev_attr_end_phys_index.attr,
 +      &dev_attr_state.attr,
 +      &dev_attr_phys_device.attr,
 +      &dev_attr_removable.attr,
 +      NULL
 +};
 +
 +static struct attribute_group memory_memblk_attr_group = {
 +      .attrs = memory_memblk_attrs,
 +};
 +
 +static const struct attribute_group *memory_memblk_attr_groups[] = {
 +      &memory_memblk_attr_group,
 +      NULL,
 +};
 +
 +/*
 + * register_memory - Setup a sysfs device for a memory block
 + */
 +static
 +int register_memory(struct memory_block *memory)
 +{
 +      int error;
 +
 +      memory->dev.bus = &memory_subsys;
 +      memory->dev.id = memory->start_section_nr / sections_per_block;
 +      memory->dev.release = memory_block_release;
 +      memory->dev.groups = memory_memblk_attr_groups;
++      memory->dev.offline = memory->state == MEM_OFFLINE;
 +
 +      error = device_register(&memory->dev);
 +      return error;
 +}
 +
  static int init_memory_block(struct memory_block **memory,
                             struct mem_section *section, unsigned long state)
  {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 9d4835a8f8b8df4f3d277b7244c2f1b7abeebe5c,eeb33315514c332ddf83b9fcf4183a580555bab6..bcf8c0d4cd981b49ff9b545d8942d9810fd1f169
@@@ -650,8 -655,9 +657,11 @@@ struct acpi_dev_node 
   * @release:  Callback to free the device after all references have
   *            gone away. This should be set by the allocator of the
   *            device (i.e. the bus driver that discovered the device).
 + * @iommu_group: IOMMU group the device belongs to.
 + *
+  * @offline_disabled: If set, the device is permanently online.
+  * @offline:  Set after successful invocation of bus type's .offline().
+  *
   * At the lowest level, every device in a Linux system is represented by an
   * instance of struct device. The device structure contains the information
   * that the device model core needs to model the system. Most subsystems,