]> Git Repo - linux.git/commitdiff
Merge tag 'pm+acpi-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <[email protected]>
Tue, 1 Apr 2014 19:48:54 +0000 (12:48 -0700)
committerLinus Torvalds <[email protected]>
Tue, 1 Apr 2014 19:48:54 +0000 (12:48 -0700)
Pull ACPI and power management updates from Rafael Wysocki:
 "The majority of this material spent some time in linux-next, some of
  it even several weeks.  There are a few relatively fresh commits in
  it, but they are mostly fixes and simple cleanups.

  ACPI took the lead this time, both in terms of the number of commits
  and the number of modified lines of code, cpufreq follows and there
  are a few changes in the PM core and in cpuidle too.

  A new feature that already got some LWN.net's attention is the device
  PM QoS extension allowing latency tolerance requirements to be
  propagated from leaf devices to their ancestors with hardware
  interfaces for specifying latency tolerance.  That should help systems
  with hardware-driven power management to avoid going too far with it
  in cases when there are latency tolerance constraints.

  There also are some significant changes in the ACPI core related to
  the way in which hotplug notifications are handled.  They affect PCI
  hotplug (ACPIPHP) and the ACPI dock station code too.  The bottom line
  is that all those notification now go through the root notify handler
  and are propagated to the interested subsystems by means of callbacks
  instead of having to install a notify handler for each device object
  that we can potentially get hotplug notifications for.

  In addition to that ACPICA will now advertise "Windows 2013"
  compatibility for _OSI, because some systems out there don't work
  correctly if that is not done (some of them don't even boot).

  On the system suspend side of things, all of the device suspend and
  resume callbacks, except for ->prepare() and ->complete(), are now
  going to be executed asynchronously as that turns out to speed up
  system suspend and resume on some platforms quite significantly and we
  have a few more optimizations in that area.

  Apart from that, there are some new device IDs and fixes and cleanups
  all over.  In particular, the system suspend and resume handling by
  cpufreq should be improved and the cpuidle menu governor should be a
  bit more robust now.

  Specifics:

   - Device PM QoS support for latency tolerance constraints on systems
     with hardware interfaces allowing such constraints to be specified.
     That is necessary to prevent hardware-driven power management from
     becoming overly aggressive on some systems and to prevent power
     management features leading to excessive latencies from being used
     in some cases.

   - Consolidation of the handling of ACPI hotplug notifications for
     device objects.  This causes all device hotplug notifications to go
     through the root notify handler (that was executed for all of them
     anyway before) that propagates them to individual subsystems, if
     necessary, by executing callbacks provided by those subsystems
     (those callbacks are associated with struct acpi_device objects
     during device enumeration).  As a result, the code in question
     becomes both smaller in size and more straightforward and all of
     those changes should not affect users.

   - ACPICA update, including fixes related to the handling of _PRT in
     cases when it is broken and the addition of "Windows 2013" to the
     list of supported "features" for _OSI (which is necessary to
     support systems that work incorrectly or don't even boot without
     it).  Changes from Bob Moore and Lv Zheng.

   - Consolidation of ACPI _OST handling from Jiang Liu.

   - ACPI battery and AC fixes allowing unusual system configurations to
     be handled by that code from Alexander Mezin.

   - New device IDs for the ACPI LPSS driver from Chiau Ee Chew.

   - ACPI fan and thermal optimizations related to system suspend and
     resume from Aaron Lu.

   - Cleanups related to ACPI video from Jean Delvare.

   - Assorted ACPI fixes and cleanups from Al Stone, Hanjun Guo, Lan
     Tianyu, Paul Bolle, Tomasz Nowicki.

   - Intel RAPL (Running Average Power Limits) driver cleanups from
     Jacob Pan.

   - intel_pstate fixes and cleanups from Dirk Brandewie.

   - cpufreq fixes related to system suspend/resume handling from Viresh
     Kumar.

   - cpufreq core fixes and cleanups from Viresh Kumar, Stratos
     Karafotis, Saravana Kannan, Rashika Kheria, Joe Perches.

   - cpufreq drivers updates from Viresh Kumar, Zhuoyu Zhang, Rob
     Herring.

   - cpuidle fixes related to the menu governor from Tuukka Tikkanen.

   - cpuidle fix related to coupled CPUs handling from Paul Burton.

   - Asynchronous execution of all device suspend and resume callbacks,
     except for ->prepare and ->complete, during system suspend and
     resume from Chuansheng Liu.

   - Delayed resuming of runtime-suspended devices during system suspend
     for the PCI bus type and ACPI PM domain.

   - New set of PM helper routines to allow device runtime PM callbacks
     to be used during system suspend and resume more easily from Ulf
     Hansson.

   - Assorted fixes and cleanups in the PM core from Geert Uytterhoeven,
     Prabhakar Lad, Philipp Zabel, Rashika Kheria, Sebastian Capella.

   - devfreq fix from Saravana Kannan"

* tag 'pm+acpi-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
  PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs
  PM / sleep: Correct whitespace errors in <linux/pm.h>
  intel_pstate: Set core to min P state during core offline
  cpufreq: Add stop CPU callback to cpufreq_driver interface
  cpufreq: Remove unnecessary braces
  cpufreq: Fix checkpatch errors and warnings
  cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs
  MAINTAINERS: Reorder maintainer addresses for PM and ACPI
  PM / Runtime: Update runtime_idle() documentation for return value meaning
  video / output: Drop display output class support
  fujitsu-laptop: Drop unneeded include
  acer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL
  ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL
  ACPI / video: fix ACPI_VIDEO dependencies
  cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}
  cpufreq: Do not allow ->setpolicy drivers to provide ->target
  cpufreq: arm_big_little: set 'physical_cluster' for each CPU
  cpufreq: arm_big_little: make vexpress driver depend on bL core driver
  ACPI / button: Add ACPI Button event via netlink routine
  ACPI: Remove duplicate definitions of PREFIX
  ...

1  2 
Documentation/kernel-parameters.txt
MAINTAINERS
arch/arm64/Kconfig
arch/ia64/configs/generic_defconfig
arch/sparc/kernel/time_64.c
arch/x86/kernel/acpi/boot.c
drivers/ata/libata-acpi.c
drivers/cpufreq/cpufreq_stats.c
drivers/cpuidle/cpuidle.c

index 67755ea834a7857afb424bd2353131f23aa85c9a,bf0fda0125f08086227dc354c050ba2508761cb9..121d5fcbd94aa200d219ef36d6445169fd24ebd7
@@@ -231,6 -231,14 +231,14 @@@ bytes respectively. Such letter suffixe
  
        acpi_no_auto_ssdt       [HW,ACPI] Disable automatic loading of SSDT
  
+       acpica_no_return_repair [HW, ACPI]
+                       Disable AML predefined validation mechanism
+                       This mechanism can repair the evaluation result to make
+                       the return objects more ACPI specification compliant.
+                       This option is useful for developers to identify the
+                       root cause of an AML interpreter issue when the issue
+                       has something to do with the repair mechanism.
        acpi_os_name=   [HW,ACPI] Tell ACPI BIOS the name of the OS
                        Format: To spoof as Windows 98: ="Microsoft Windows"
  
                        parameter will force ia64_sal_cache_flush to call
                        ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
  
 +      forcepae [X86-32]
 +                      Forcefully enable Physical Address Extension (PAE).
 +                      Many Pentium M systems disable PAE but may have a
 +                      functionally usable PAE implementation.
 +                      Warning: use of this parameter will taint the kernel
 +                      and may cause unknown problems.
 +
        ftrace=[tracer]
                        [FTRACE] will set and start the specified tracer
                        as early as possible in order to facilitate early
                        IOAPICs that may be present in the system.
  
        nokaslr         [X86]
 -                      Disable kernel base offset ASLR (Address Space
 -                      Layout Randomization) if built into the kernel.
 +                      Disable kernel and module base offset ASLR (Address
 +                      Space Layout Randomization) if built into the kernel.
  
        noautogroup     Disable scheduler automatic task group creation.
  
diff --combined MAINTAINERS
index d1f3cb340e0141fd40db1db68f42543077bcc653,9d33ccbc3934f97e618074e012a1f43f645081ad..eea871fdb8f93e4e4234a2ded4a9a85c707ad8cf
@@@ -242,8 -242,8 +242,8 @@@ S: Maintaine
  F:    drivers/platform/x86/acer-wmi.c
  
  ACPI
- M:    Len Brown <[email protected]>
  M:    Rafael J. Wysocki <[email protected]>
+ M:    Len Brown <[email protected]>
  L:    [email protected]
  W:    https://01.org/linux-acpi
  Q:    https://patchwork.kernel.org/project/linux-acpi/list/
@@@ -911,11 -911,11 +911,11 @@@ F:      arch/arm/include/asm/hardware/dec212
  F:    arch/arm/mach-footbridge/
  
  ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
 -M:    Shawn Guo <shawn.guo@linaro.org>
 +M:    Shawn Guo <shawn.guo@freescale.com>
  M:    Sascha Hauer <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -T:    git git://git.linaro.org/people/shawnguo/linux-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
  F:    arch/arm/mach-imx/
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
@@@ -1320,7 -1320,6 +1320,7 @@@ M:      Linus Walleij <linus.walleij@linaro.
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
  F:    arch/arm/mach-u300/
 +F:    drivers/clocksource/timer-u300.c
  F:    drivers/i2c/busses/i2c-stu300.c
  F:    drivers/rtc/rtc-coh901331.c
  F:    drivers/watchdog/coh901327_wdt.c
@@@ -1833,8 -1832,8 +1833,8 @@@ F:      net/bluetooth
  F:    include/net/bluetooth/
  
  BONDING DRIVER
 -M:    Jay Vosburgh <[email protected].com>
 -M:    Veaceslav Falico <vfalico@redhat.com>
 +M:    Jay Vosburgh <j.vosburgh@gmail.com>
 +M:    Veaceslav Falico <vfalico@gmail.com>
  M:    Andy Gospodarek <[email protected]>
  L:    [email protected]
  W:    http://sourceforge.net/projects/bonding/
@@@ -2802,9 -2801,9 +2802,9 @@@ S:      Supporte
  F:    drivers/acpi/dock.c
  
  DOCUMENTATION
 -M:    Rob Landley <[email protected]>
 +M:    Randy Dunlap <[email protected]>
  L:    [email protected]
 -T:    TBD
 +T:    quilt http://www.infradead.org/~rdunlap/Doc/patches/
  S:    Maintained
  F:    Documentation/
  
@@@ -3658,8 -3657,8 +3658,8 @@@ S:      Maintaine
  F:    fs/freevxfs/
  
  FREEZER
- M:    Pavel Machek <[email protected]>
  M:    "Rafael J. Wysocki" <[email protected]>
+ M:    Pavel Machek <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    Documentation/power/freezing-of-tasks.txt
@@@ -4023,8 -4022,8 +4023,8 @@@ S:      Maintaine
  F:    drivers/video/hgafb.c
  
  HIBERNATION (aka Software Suspend, aka swsusp)
- M:    Pavel Machek <[email protected]>
  M:    "Rafael J. Wysocki" <[email protected]>
+ M:    Pavel Machek <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    arch/x86/power/
@@@ -4546,7 -4545,6 +4546,7 @@@ M:      Greg Rose <[email protected]
  M:    Alex Duyck <[email protected]>
  M:    John Ronciak <[email protected]>
  M:    Mitch Williams <[email protected]>
 +M:    Linux NICS <[email protected]>
  L:    [email protected]
  W:    http://www.intel.com/support/feedback.htm
  W:    http://e1000.sourceforge.net/
@@@ -6007,7 -6005,6 +6007,7 @@@ F:      include/uapi/linux/net.
  F:    include/uapi/linux/netdevice.h
  F:    tools/net/
  F:    tools/testing/selftests/net/
 +F:    lib/random32.c
  
  NETWORKING [IPv4/IPv6]
  M:    "David S. Miller" <[email protected]>
@@@ -7406,26 -7403,10 +7406,26 @@@ W:   http://www.ibm.com/developerworks/li
  S:    Supported
  F:    arch/s390/
  F:    drivers/s390/
 -F:    block/partitions/ibm.c
  F:    Documentation/s390/
  F:    Documentation/DocBook/s390*
  
 +S390 COMMON I/O LAYER
 +M:    Sebastian Ott <[email protected]>
 +M:    Peter Oberparleiter <[email protected]>
 +L:    [email protected]
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    drivers/s390/cio/
 +
 +S390 DASD DRIVER
 +M:    Stefan Weinhuber <[email protected]>
 +M:    Stefan Haberland <[email protected]>
 +L:    [email protected]
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    drivers/s390/block/dasd*
 +F:    block/partitions/ibm.c
 +
  S390 NETWORK DRIVERS
  M:    Ursula Braun <[email protected]>
  M:    Frank Blaschka <[email protected]>
@@@ -7435,15 -7416,6 +7435,15 @@@ W:    http://www.ibm.com/developerworks/li
  S:    Supported
  F:    drivers/s390/net/
  
 +S390 PCI SUBSYSTEM
 +M:    Sebastian Ott <[email protected]>
 +M:    Gerald Schaefer <[email protected]>
 +L:    [email protected]
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    arch/s390/pci/
 +F:    drivers/pci/hotplug/s390_pci_hpc.c
 +
  S390 ZCRYPT DRIVER
  M:    Ingo Tuchscherer <[email protected]>
  M:    [email protected]
@@@ -8453,9 -8425,9 +8453,9 @@@ F:      arch/sh
  F:    drivers/sh/
  
  SUSPEND TO RAM
+ M:    "Rafael J. Wysocki" <[email protected]>
  M:    Len Brown <[email protected]>
  M:    Pavel Machek <[email protected]>
- M:    "Rafael J. Wysocki" <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    Documentation/power/
diff --combined arch/arm64/Kconfig
index 516d8a7ca697d5fb0ed642316d2187bfa4ad9b22,c6e2f5bb1a7bf1e7499548f32db4e795b5db5199..07aa3556952cd773adf64d1ff8d2e2a63f8e3faa
@@@ -16,7 -16,6 +16,7 @@@ config ARM6
        select DCACHE_WORD_ACCESS
        select GENERIC_CLOCKEVENTS
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 +      select GENERIC_CPU_AUTOPROBE
        select GENERIC_IOMAP
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
@@@ -27,7 -26,6 +27,7 @@@
        select GENERIC_TIME_VSYSCALL
        select HARDIRQS_SW_RESEND
        select HAVE_ARCH_JUMP_LABEL
 +      select HAVE_ARCH_KGDB
        select HAVE_ARCH_TRACEHOOK
        select HAVE_DEBUG_BUGVERBOSE
        select HAVE_DEBUG_KMEMLEAK
@@@ -40,8 -38,6 +40,8 @@@
        select HAVE_MEMBLOCK
        select HAVE_PATA_PLATFORM
        select HAVE_PERF_EVENTS
 +      select HAVE_PERF_REGS
 +      select HAVE_PERF_USER_STACK_DUMP
        select IRQ_DOMAIN
        select MODULES_USE_ELF_RELA
        select NO_BOOTMEM
@@@ -77,7 -73,7 +77,7 @@@ config LOCKDEP_SUPPOR
  config TRACE_IRQFLAGS_SUPPORT
        def_bool y
  
 -config RWSEM_GENERIC_SPINLOCK
 +config RWSEM_XCHGADD_ALGORITHM
        def_bool y
  
  config GENERIC_HWEIGHT
@@@ -89,7 -85,7 +89,7 @@@ config GENERIC_CSU
  config GENERIC_CALIBRATE_DELAY
        def_bool y
  
 -config ZONE_DMA32
 +config ZONE_DMA
        def_bool y
  
  config ARCH_DMA_ADDR_T_64BIT
@@@ -168,22 -164,6 +168,22 @@@ config SM
  
          If you don't know what to do here, say N.
  
 +config SCHED_MC
 +      bool "Multi-core scheduler support"
 +      depends on SMP
 +      help
 +        Multi-core scheduler support improves the CPU scheduler's decision
 +        making when dealing with multi-core CPU chips at a cost of slightly
 +        increased overhead in some places. If unsure say N here.
 +
 +config SCHED_SMT
 +      bool "SMT scheduler support"
 +      depends on SMP
 +      help
 +        Improves the CPU scheduler's decision making when dealing with
 +        MultiThreading at a cost of slightly increased overhead in some
 +        places. If unsure say N here.
 +
  config NR_CPUS
        int "Maximum number of CPUs (2-32)"
        range 2 32
@@@ -321,10 -301,16 +321,18 @@@ menu "CPU Power Management
  
  source "drivers/cpuidle/Kconfig"
  
 +source "drivers/cpufreq/Kconfig"
 +
  endmenu
  
+ menu "Power management options"
+ source "kernel/power/Kconfig"
+ source "drivers/cpufreq/Kconfig"
+ endmenu
  source "net/Kconfig"
  
  source "drivers/Kconfig"
index 6404acbb84b295e57274a9bbc24d433238386901,f4a0daa556eb56f98e4dc2a4f9a312ee4024a9ac..b4efaf2bc13e9c104e075072dec02399542c53ec
@@@ -25,14 -25,13 +25,13 @@@ CONFIG_KEXEC=
  CONFIG_CRASH_DUMP=y
  CONFIG_EFI_VARS=y
  CONFIG_BINFMT_MISC=m
- CONFIG_ACPI_PROCFS=y
  CONFIG_ACPI_BUTTON=m
  CONFIG_ACPI_FAN=m
  CONFIG_ACPI_DOCK=y
  CONFIG_ACPI_PROCESSOR=m
 -CONFIG_ACPI_CONTAINER=m
 +CONFIG_ACPI_CONTAINER=y
  CONFIG_HOTPLUG_PCI=y
 -CONFIG_HOTPLUG_PCI_ACPI=m
 +CONFIG_HOTPLUG_PCI_ACPI=y
  CONFIG_PACKET=y
  CONFIG_UNIX=y
  CONFIG_INET=y
index 24e8b8705e7f958c60982b4526b78cd7b1f52e10,b397e053b8728f41e66c9c82bc048b46c3059bc5..3fddf64c7fc63ab81bb1ec0599b9cefa790ec6c8
@@@ -659,8 -659,7 +659,7 @@@ static int sparc64_cpufreq_notifier(str
                ft->clock_tick_ref = cpu_data(cpu).clock_tick;
        }
        if ((val == CPUFREQ_PRECHANGE  && freq->old < freq->new) ||
-           (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
-           (val == CPUFREQ_RESUMECHANGE)) {
+           (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
                cpu_data(cpu).clock_tick =
                        cpufreq_scale(ft->clock_tick_ref,
                                      ft->ref_freq,
@@@ -733,7 -732,7 +732,7 @@@ void __irq_entry timer_interrupt(int ir
        irq_enter();
  
        local_cpu_data().irq0_irqs++;
 -      kstat_incr_irqs_this_cpu(0, irq_to_desc(0));
 +      kstat_incr_irq_this_cpu(0);
  
        if (unlikely(!evt->event_handler)) {
                printk(KERN_WARNING
index 9f46f2b1cfc2d528507dbb2986a30aacf44e2c8e,123f9e37eee40821b1576cd9dd9a7c7e83c56479..8e61d23b8f64679577682756272d1e2ff242de07
@@@ -53,10 -53,6 +53,6 @@@ EXPORT_SYMBOL(acpi_disabled)
  # include <asm/proto.h>
  #endif                                /* X86 */
  
- #define BAD_MADT_ENTRY(entry, end) (                                      \
-               (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
-               ((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
  #define PREFIX                        "ACPI: "
  
  int acpi_noirq;                               /* skip ACPI IRQ initialization */
@@@ -613,10 -609,10 +609,10 @@@ static void acpi_map_cpu2node(acpi_hand
        int nid;
  
        nid = acpi_get_node(handle);
 -      if (nid == -1 || !node_online(nid))
 -              return;
 -      set_apicid_to_node(physid, nid);
 -      numa_set_node(cpu, nid);
 +      if (nid != -1) {
 +              set_apicid_to_node(physid, nid);
 +              numa_set_node(cpu, nid);
 +      }
  #endif
  }
  
index b4f7cc2522d91a3d843c5c65478549bd0a79c601,acb95dffdb6a70f605e0987c1a0db58057ff42e2..97a14fe47de1b357f34081379f96454a3b6e49dc
@@@ -38,6 -38,16 +38,16 @@@ static void ata_acpi_clear_gtf(struct a
        dev->gtf_cache = NULL;
  }
  
+ struct ata_acpi_hotplug_context {
+       struct acpi_hotplug_context hp;
+       union {
+               struct ata_port *ap;
+               struct ata_device *dev;
+       } data;
+ };
+ #define ata_hotplug_data(context) (container_of((context), struct ata_acpi_hotplug_context, hp)->data)
  /**
   * ata_dev_acpi_handle - provide the acpi_handle for an ata_device
   * @dev: the acpi_handle returned will correspond to this device
@@@ -121,18 -131,17 +131,17 @@@ static void ata_acpi_handle_hotplug(str
                ata_port_wait_eh(ap);
  }
  
- static void ata_acpi_dev_notify_dock(acpi_handle handle, u32 event, void *data)
+ static int ata_acpi_dev_notify_dock(struct acpi_device *adev, u32 event)
  {
-       struct ata_device *dev = data;
+       struct ata_device *dev = ata_hotplug_data(adev->hp).dev;
        ata_acpi_handle_hotplug(dev->link->ap, dev, event);
+       return 0;
  }
  
- static void ata_acpi_ap_notify_dock(acpi_handle handle, u32 event, void *data)
+ static int ata_acpi_ap_notify_dock(struct acpi_device *adev, u32 event)
  {
-       struct ata_port *ap = data;
-       ata_acpi_handle_hotplug(ap, NULL, event);
+       ata_acpi_handle_hotplug(ata_hotplug_data(adev->hp).ap, NULL, event);
+       return 0;
  }
  
  static void ata_acpi_uevent(struct ata_port *ap, struct ata_device *dev,
        }
  }
  
- static void ata_acpi_ap_uevent(acpi_handle handle, u32 event, void *data)
+ static void ata_acpi_ap_uevent(struct acpi_device *adev, u32 event)
  {
-       ata_acpi_uevent(data, NULL, event);
+       ata_acpi_uevent(ata_hotplug_data(adev->hp).ap, NULL, event);
  }
  
- static void ata_acpi_dev_uevent(acpi_handle handle, u32 event, void *data)
+ static void ata_acpi_dev_uevent(struct acpi_device *adev, u32 event)
  {
-       struct ata_device *dev = data;
+       struct ata_device *dev = ata_hotplug_data(adev->hp).dev;
        ata_acpi_uevent(dev->link->ap, dev, event);
  }
  
- static const struct acpi_dock_ops ata_acpi_dev_dock_ops = {
-       .handler = ata_acpi_dev_notify_dock,
-       .uevent = ata_acpi_dev_uevent,
- };
- static const struct acpi_dock_ops ata_acpi_ap_dock_ops = {
-       .handler = ata_acpi_ap_notify_dock,
-       .uevent = ata_acpi_ap_uevent,
- };
  /* bind acpi handle to pata port */
  void ata_acpi_bind_port(struct ata_port *ap)
  {
        struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev);
+       struct acpi_device *adev;
+       struct ata_acpi_hotplug_context *context;
  
        if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA || !host_companion)
                return;
        if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0)
                ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
  
-       /* we might be on a docking station */
-       register_hotplug_dock_device(ACPI_HANDLE(&ap->tdev),
-                                    &ata_acpi_ap_dock_ops, ap, NULL, NULL);
+       adev = ACPI_COMPANION(&ap->tdev);
+       if (!adev || adev->hp)
+               return;
+       context = kzalloc(sizeof(*context), GFP_KERNEL);
+       if (!context)
+               return;
+       context->data.ap = ap;
+       acpi_initialize_hp_context(adev, &context->hp, ata_acpi_ap_notify_dock,
+                                  ata_acpi_ap_uevent);
  }
  
  void ata_acpi_bind_dev(struct ata_device *dev)
        struct ata_port *ap = dev->link->ap;
        struct acpi_device *port_companion = ACPI_COMPANION(&ap->tdev);
        struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev);
-       struct acpi_device *parent;
+       struct acpi_device *parent, *adev;
+       struct ata_acpi_hotplug_context *context;
        u64 adr;
  
        /*
        }
  
        acpi_preset_companion(&dev->tdev, parent, adr);
+       adev = ACPI_COMPANION(&dev->tdev);
+       if (!adev || adev->hp)
+               return;
+       context = kzalloc(sizeof(*context), GFP_KERNEL);
+       if (!context)
+               return;
  
-       register_hotplug_dock_device(ata_dev_acpi_handle(dev),
-                                    &ata_acpi_dev_dock_ops, dev, NULL, NULL);
+       context->data.dev = dev;
+       acpi_initialize_hp_context(adev, &context->hp, ata_acpi_dev_notify_dock,
+                                  ata_acpi_dev_uevent);
  }
  
  /**
@@@ -835,7 -853,6 +853,7 @@@ void ata_acpi_on_resume(struct ata_por
                ata_for_each_dev(dev, &ap->link, ALL) {
                        ata_acpi_clear_gtf(dev);
                        if (ata_dev_enabled(dev) &&
 +                          ata_dev_acpi_handle(dev) &&
                            ata_dev_get_GTF(dev, NULL) >= 0)
                                dev->flags |= ATA_DFLAG_ACPI_PENDING;
                }
index 79911a27a48a90768c16a197633a2d1592fda27c,eb214d83ad6b5bf98273d21eb3d06802bdce183f..ecaaebf969fc4e5427464dfce53d0bb321e3c39b
@@@ -13,7 -13,7 +13,7 @@@
  #include <linux/cpufreq.h>
  #include <linux/module.h>
  #include <linux/slab.h>
 -#include <asm/cputime.h>
 +#include <linux/cputime.h>
  
  static spinlock_t cpufreq_stats_lock;
  
@@@ -180,27 -180,25 +180,25 @@@ static void cpufreq_stats_free_table(un
        cpufreq_cpu_put(policy);
  }
  
- static int __cpufreq_stats_create_table(struct cpufreq_policy *policy,
-               struct cpufreq_frequency_table *table)
+ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy)
  {
        unsigned int i, j, count = 0, ret = 0;
        struct cpufreq_stats *stat;
-       struct cpufreq_policy *current_policy;
        unsigned int alloc_size;
        unsigned int cpu = policy->cpu;
+       struct cpufreq_frequency_table *table;
+       table = cpufreq_frequency_get_table(cpu);
+       if (unlikely(!table))
+               return 0;
        if (per_cpu(cpufreq_stats_table, cpu))
                return -EBUSY;
        stat = kzalloc(sizeof(*stat), GFP_KERNEL);
        if ((stat) == NULL)
                return -ENOMEM;
  
-       current_policy = cpufreq_cpu_get(cpu);
-       if (current_policy == NULL) {
-               ret = -EINVAL;
-               goto error_get_fail;
-       }
-       ret = sysfs_create_group(&current_policy->kobj, &stats_attr_group);
+       ret = sysfs_create_group(&policy->kobj, &stats_attr_group);
        if (ret)
                goto error_out;
  
        stat->time_in_state = kzalloc(alloc_size, GFP_KERNEL);
        if (!stat->time_in_state) {
                ret = -ENOMEM;
-               goto error_out;
+               goto error_alloc;
        }
        stat->freq_table = (unsigned int *)(stat->time_in_state + count);
  
        stat->last_time = get_jiffies_64();
        stat->last_index = freq_table_get_index(stat, policy->cur);
        spin_unlock(&cpufreq_stats_lock);
-       cpufreq_cpu_put(current_policy);
        return 0;
+ error_alloc:
+       sysfs_remove_group(&policy->kobj, &stats_attr_group);
  error_out:
-       cpufreq_cpu_put(current_policy);
- error_get_fail:
        kfree(stat);
        per_cpu(cpufreq_stats_table, cpu) = NULL;
        return ret;
  static void cpufreq_stats_create_table(unsigned int cpu)
  {
        struct cpufreq_policy *policy;
-       struct cpufreq_frequency_table *table;
  
        /*
         * "likely(!policy)" because normally cpufreq_stats will be registered
        if (likely(!policy))
                return;
  
-       table = cpufreq_frequency_get_table(policy->cpu);
-       if (likely(table))
-               __cpufreq_stats_create_table(policy, table);
+       __cpufreq_stats_create_table(policy);
  
        cpufreq_cpu_put(policy);
  }
@@@ -291,20 -285,14 +285,14 @@@ static int cpufreq_stat_notifier_policy
  {
        int ret = 0;
        struct cpufreq_policy *policy = data;
-       struct cpufreq_frequency_table *table;
-       unsigned int cpu = policy->cpu;
  
        if (val == CPUFREQ_UPDATE_POLICY_CPU) {
                cpufreq_stats_update_policy_cpu(policy);
                return 0;
        }
  
-       table = cpufreq_frequency_get_table(cpu);
-       if (!table)
-               return 0;
        if (val == CPUFREQ_CREATE_POLICY)
-               ret = __cpufreq_stats_create_table(policy, table);
+               ret = __cpufreq_stats_create_table(policy);
        else if (val == CPUFREQ_REMOVE_POLICY)
                __cpufreq_stats_free_table(policy);
  
index 09d05ab262beea598480bd1ac3eefa69a089c352,366e6840ec46f0d63a97156aeba3725090cf0ef9..cb20fd915be8cefb87c0a35a338dfedc70374a08
@@@ -85,7 -85,8 +85,8 @@@ int cpuidle_enter_state(struct cpuidle_
  
        time_end = ktime_get();
  
-       local_irq_enable();
+       if (!cpuidle_state_is_coupled(dev, drv, entered_state))
+               local_irq_enable();
  
        diff = ktime_to_us(ktime_sub(time_end, time_start));
        if (diff > INT_MAX)
@@@ -140,14 -141,12 +141,14 @@@ int cpuidle_idle_call(void
                return 0;
        }
  
 -      trace_cpu_idle_rcuidle(next_state, dev->cpu);
 -
        broadcast = !!(drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP);
  
 -      if (broadcast)
 -              clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
 +      if (broadcast &&
 +          clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu))
 +              return -EBUSY;
 +
 +
 +      trace_cpu_idle_rcuidle(next_state, dev->cpu);
  
        if (cpuidle_state_is_coupled(dev, drv, next_state))
                entered_state = cpuidle_enter_state_coupled(dev, drv,
        else
                entered_state = cpuidle_enter_state(dev, drv, next_state);
  
 +      trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
 +
        if (broadcast)
                clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
  
 -      trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
 -
        /* give the governor an opportunity to reflect on the outcome */
        if (cpuidle_curr_governor->reflect)
                cpuidle_curr_governor->reflect(dev, entered_state);
This page took 0.186076 seconds and 4 git commands to generate.