aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 23:41:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 23:41:48 -0500
commitf9300eaaac1ca300083ad41937923a90cc3a2394 (patch)
tree724b72ad729a8b85c09d2d54f8ca7d8ba22d774f /drivers/pci
parent7f2dc5c4bcbff035b0d03f7aa78a182664b21e47 (diff)
parentfaddf2f5d278f1656e9444961bdd8d9db4deb5bf (diff)
Merge tag 'pm+acpi-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
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
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/acpi_pcihp.c7
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c18
-rw-r--r--drivers/pci/pci-acpi.c3
3 files changed, 10 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c
index 2a47e82821da..5440131cd4ee 100644
--- a/drivers/pci/hotplug/acpi_pcihp.c
+++ b/drivers/pci/hotplug/acpi_pcihp.c
@@ -411,13 +411,10 @@ EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware);
411static int pcihp_is_ejectable(acpi_handle handle) 411static int pcihp_is_ejectable(acpi_handle handle)
412{ 412{
413 acpi_status status; 413 acpi_status status;
414 acpi_handle tmp;
415 unsigned long long removable; 414 unsigned long long removable;
416 status = acpi_get_handle(handle, "_ADR", &tmp); 415 if (!acpi_has_method(handle, "_ADR"))
417 if (ACPI_FAILURE(status))
418 return 0; 416 return 0;
419 status = acpi_get_handle(handle, "_EJ0", &tmp); 417 if (acpi_has_method(handle, "_EJ0"))
420 if (ACPI_SUCCESS(status))
421 return 1; 418 return 1;
422 status = acpi_evaluate_integer(handle, "_RMV", NULL, &removable); 419 status = acpi_evaluate_integer(handle, "_RMV", NULL, &removable);
423 if (ACPI_SUCCESS(status) && removable) 420 if (ACPI_SUCCESS(status) && removable)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 1ea75236a15f..4a0a9ac7a1e5 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -871,21 +871,17 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
871 put_bridge(bridge); 871 put_bridge(bridge);
872} 872}
873 873
874static void hotplug_event_work(struct work_struct *work) 874static void hotplug_event_work(void *data, u32 type)
875{ 875{
876 struct acpiphp_context *context; 876 struct acpiphp_context *context = data;
877 struct acpi_hp_work *hp_work; 877 acpi_handle handle = context->handle;
878 878
879 hp_work = container_of(work, struct acpi_hp_work, work);
880 context = hp_work->context;
881 acpi_scan_lock_acquire(); 879 acpi_scan_lock_acquire();
882 880
883 hotplug_event(hp_work->handle, hp_work->type, context); 881 hotplug_event(handle, type, context);
884 882
885 acpi_scan_lock_release(); 883 acpi_scan_lock_release();
886 acpi_evaluate_hotplug_ost(hp_work->handle, hp_work->type, 884 acpi_evaluate_hotplug_ost(handle, type, ACPI_OST_SC_SUCCESS, NULL);
887 ACPI_OST_SC_SUCCESS, NULL);
888 kfree(hp_work); /* allocated in handle_hotplug_event() */
889 put_bridge(context->func.parent); 885 put_bridge(context->func.parent);
890} 886}
891 887
@@ -936,10 +932,10 @@ static void handle_hotplug_event(acpi_handle handle, u32 type, void *data)
936 932
937 mutex_lock(&acpiphp_context_lock); 933 mutex_lock(&acpiphp_context_lock);
938 context = acpiphp_get_context(handle); 934 context = acpiphp_get_context(handle);
939 if (context) { 935 if (context && !WARN_ON(context->handle != handle)) {
940 get_bridge(context->func.parent); 936 get_bridge(context->func.parent);
941 acpiphp_put_context(context); 937 acpiphp_put_context(context);
942 alloc_acpi_hp_work(handle, type, context, hotplug_event_work); 938 acpi_hotplug_execute(hotplug_event_work, context, type);
943 mutex_unlock(&acpiphp_context_lock); 939 mutex_unlock(&acpiphp_context_lock);
944 return; 940 return;
945 } 941 }
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index b0299e6d9a3f..dfd1f59de729 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -181,7 +181,6 @@ static bool acpi_pci_power_manageable(struct pci_dev *dev)
181static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) 181static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
182{ 182{
183 acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); 183 acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
184 acpi_handle tmp;
185 static const u8 state_conv[] = { 184 static const u8 state_conv[] = {
186 [PCI_D0] = ACPI_STATE_D0, 185 [PCI_D0] = ACPI_STATE_D0,
187 [PCI_D1] = ACPI_STATE_D1, 186 [PCI_D1] = ACPI_STATE_D1,
@@ -192,7 +191,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
192 int error = -EINVAL; 191 int error = -EINVAL;
193 192
194 /* If the ACPI device has _EJ0, ignore the device */ 193 /* If the ACPI device has _EJ0, ignore the device */
195 if (!handle || ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) 194 if (!handle || acpi_has_method(handle, "_EJ0"))
196 return -ENODEV; 195 return -ENODEV;
197 196
198 switch (state) { 197 switch (state) {