Skip to content

Commit

Permalink
Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/rafael/linux-pm

Pull more ACPI and power management updates from Rafael Wysocki:
 "These are regression fixes (leds-gpio, ACPI backlight driver,
  operating performance points library, ACPI device enumeration
  messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
  PM), some cleanups in the operating performance points (OPP)
  framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
  minor intel_pstate driver changes, a new MAINTAINERS entry for it and
  an ACPI fan driver change needed for better support of thermal
  management in user space.

  Specifics:

   - Fix a regression in leds-gpio introduced by a recent commit that
     inadvertently changed the name of one of the properties used by the
     driver (Fabio Estevam).

   - Fix a regression in the ACPI backlight driver introduced by a
     recent fix that missed one special case that had to be taken into
     account (Aaron Lu).

   - Drop the level of some new kernel messages from the ACPI core
     introduced by a recent commit to KERN_DEBUG which they should have
     used from the start and drop some other unuseful KERN_ERR messages
     printed by ACPI (Rafael J Wysocki).

   - Revert an incorrect commit modifying the cpupower tool (Prarit
     Bhargava).

   - Fix two regressions introduced by recent commits in the OPP library
     and clean up some existing minor issues in that code (Viresh
     Kumar).

   - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
     tree (or drop it where that can be done) in order to make it
     possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
     Hansson, Ludovic Desroches).

     There will be one more "CONFIG_PM_RUNTIME removal" batch after this
     one, because some new uses of it have been introduced during the
     current merge window, but that should be sufficient to finally get
     rid of it.

   - Make the ACPI EC driver more robust against race conditions related
     to GPE handler installation failures (Lv Zheng).

   - Prevent the ACPI device PM core code from attempting to disable
     GPEs that it has not enabled which confuses ACPICA and makes it
     report errors unnecessarily (Rafael J Wysocki).

   - Add a "force" command line switch to the intel_pstate driver to
     make it possible to override the blacklisting of some systems in
     that driver if needed (Ethan Zhao).

   - Improve intel_pstate code documentation and add a MAINTAINERS entry
     for it (Kristen Carlson Accardi).

   - Make the ACPI fan driver create cooling device interfaces witn
     names that reflect the IDs of the ACPI device objects they are
     associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

     That's necessary for user space thermal management tools to be able
     to connect the fans with the parts of the system they are supposed
     to be cooling properly.  From Srinivas Pandruvada"

* tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
  MAINTAINERS: add entry for intel_pstate
  ACPI / video: update the skip case for acpi_video_device_in_dod()
  power / PM: Eliminate CONFIG_PM_RUNTIME
  NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  ACPI / EC: Fix unexpected ec_remove_handlers() invocations
  Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
  tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
  PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
  mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
  PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
  ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  ACPI / PM: Do not disable wakeup GPEs that have not been enabled
  ACPI / utils: Drop error messages from acpi_evaluate_reference()
  ...
  • Loading branch information
torvalds committed Dec 19, 2014
2 parents 385336e + 2ec1c17 commit c0f486f
Show file tree
Hide file tree
Showing 66 changed files with 199 additions and 156 deletions.
9 changes: 9 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
disable
Do not enable intel_pstate as the default
scaling driver for the supported processors
force
Enable intel_pstate on systems that prohibit it by default
in favor of acpi-cpufreq. Forcing the intel_pstate driver
instead of acpi-cpufreq may disable platform features, such
as thermal controls and power capping, that rely on ACPI
P-States information being indicated to OSPM and therefore
should be used with caution. This option does not work with
processors that aren't supported by the intel_pstate driver
or on platforms that use pcc-cpufreq instead of acpi-cpufreq.
no_hwp
Do not enable hardware P state control (HWP)
if available.
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4963,6 +4963,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git
S: Supported
F: drivers/idle/intel_idle.c

INTEL PSTATE DRIVER
M: Kristen Carlson Accardi <[email protected]>
L: [email protected]
S: Supported
F: drivers/cpufreq/intel_pstate.c

INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
M: Maik Broemme <[email protected]>
L: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static void armpmu_disable(struct pmu *pmu)
armpmu->stop(armpmu);
}

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static int armpmu_runtime_resume(struct device *dev)
{
struct arm_pmu_platdata *plat = dev_get_platdata(dev);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/pm_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/pm_clock.h>
#include <linux/platform_device.h>

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static int davinci_pm_runtime_suspend(struct device *dev)
{
int ret;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ menuconfig ARCH_EXYNOS
select HAVE_S3C_RTC if RTC_CLASS
select PINCTRL
select PINCTRL_EXYNOS
select PM_GENERIC_DOMAINS if PM_RUNTIME
select PM_GENERIC_DOMAINS if PM
select S5P_DEV_MFC
select SRAM
select MFD_SYSCON
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-keystone/pm_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <linux/clk-provider.h>
#include <linux/of.h>

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static int keystone_pm_runtime_suspend(struct device *dev)
{
int ret;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/pm_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "soc.h"

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static int omap1_pm_runtime_suspend(struct device *dev)
{
int ret;
Expand Down Expand Up @@ -59,7 +59,7 @@ static struct dev_pm_domain default_pm_domain = {
#define OMAP1_PM_DOMAIN (&default_pm_domain)
#else
#define OMAP1_PM_DOMAIN NULL
#endif /* CONFIG_PM_RUNTIME */
#endif /* CONFIG_PM */

static struct pm_clk_notifier_block platform_bus_notifier = {
.pm_domain = OMAP1_PM_DOMAIN,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static void __init omap_hwmod_init_postsetup(void)
u8 postsetup_state;

/* Set the default postsetup state for all hwmods */
#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
postsetup_state = _HWMOD_STATE_IDLE;
#else
postsetup_state = _HWMOD_STATE_ENABLED;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ struct platform_device __init *omap_device_build_ss(const char *pdev_name,
return ERR_PTR(ret);
}

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static int _od_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ config IA64_SGI_UV
config IA64_HP_SIM
bool "Ski-simulator"
select SWIOTLB
depends on !PM_RUNTIME
depends on !PM

endchoice

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3968,7 +3968,7 @@ bool mp_should_keep_irq(struct device *dev)
{
if (dev->power.is_prepared)
return true;
#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
if (dev->power.runtime_status == RPM_SUSPENDING)
return true;
#endif
Expand Down
12 changes: 10 additions & 2 deletions drivers/acpi/device_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,21 @@ static int acpi_device_wakeup(struct acpi_device *adev, u32 target_state,
if (error)
return error;

if (adev->wakeup.flags.enabled)
return 0;

res = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number);
if (ACPI_FAILURE(res)) {
if (ACPI_SUCCESS(res)) {
adev->wakeup.flags.enabled = 1;
} else {
acpi_disable_wakeup_device_power(adev);
return -EIO;
}
} else {
acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
if (adev->wakeup.flags.enabled) {
acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
adev->wakeup.flags.enabled = 0;
}
acpi_disable_wakeup_device_power(adev);
}
return 0;
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ static int ec_install_handlers(struct acpi_ec *ec)

static void ec_remove_handlers(struct acpi_ec *ec)
{
if (!test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
return;
acpi_disable_gpe(NULL, ec->gpe);
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
Expand Down
8 changes: 7 additions & 1 deletion drivers/acpi/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ static int acpi_fan_probe(struct platform_device *pdev)
struct thermal_cooling_device *cdev;
struct acpi_fan *fan;
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
char *name;

fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL);
if (!fan) {
Expand All @@ -346,7 +347,12 @@ static int acpi_fan_probe(struct platform_device *pdev)
}
}

cdev = thermal_cooling_device_register("Fan", device,
if (!strncmp(pdev->name, "PNP0C0B", strlen("PNP0C0B")))
name = "Fan";
else
name = acpi_device_bid(device);

cdev = thermal_cooling_device_register(name, device,
&fan_cooling_ops);
if (IS_ERR(cdev)) {
result = PTR_ERR(cdev);
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ static void acpi_device_dep_initialize(struct acpi_device *adev)
status = acpi_evaluate_reference(adev->handle, "_DEP", NULL,
&dep_devices);
if (ACPI_FAILURE(status)) {
dev_err(&adev->dev, "Failed to evaluate _DEP.\n");
dev_dbg(&adev->dev, "Failed to evaluate _DEP.\n");
return;
}

Expand All @@ -2224,7 +2224,7 @@ static void acpi_device_dep_initialize(struct acpi_device *adev)

status = acpi_get_object_info(dep_devices.handles[i], &info);
if (ACPI_FAILURE(status)) {
dev_err(&adev->dev, "Error reading device info\n");
dev_dbg(&adev->dev, "Error reading _DEP device info\n");
continue;
}

Expand Down
12 changes: 1 addition & 11 deletions drivers/acpi/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,22 +346,16 @@ acpi_evaluate_reference(acpi_handle handle,
package = buffer.pointer;

if ((buffer.length == 0) || !package) {
printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
(unsigned)buffer.length, package);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
}
if (package->type != ACPI_TYPE_PACKAGE) {
printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
package->type);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
}
if (!package->package.count) {
printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
package);
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
Expand All @@ -380,17 +374,13 @@ acpi_evaluate_reference(acpi_handle handle,

if (element->type != ACPI_TYPE_LOCAL_REFERENCE) {
status = AE_BAD_DATA;
printk(KERN_ERR PREFIX
"Expecting a [Reference] package element, found type %X\n",
element->type);
acpi_util_eval_error(handle, pathname, status);
break;
}

if (!element->reference.handle) {
printk(KERN_WARNING PREFIX "Invalid reference in"
" package %s\n", pathname);
status = AE_NULL_ENTRY;
acpi_util_eval_error(handle, pathname, status);
break;
}
/* Get the acpi_handle. */
Expand Down
10 changes: 8 additions & 2 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ struct acpi_video_bus {
u8 dos_setting;
struct acpi_video_enumerated_device *attached_array;
u8 attached_count;
u8 child_count;
struct acpi_video_bus_cap cap;
struct acpi_video_bus_flags flags;
struct list_head video_device_list;
Expand Down Expand Up @@ -1159,8 +1160,12 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
struct acpi_video_bus *video = device->video;
int i;

/* If we have a broken _DOD, no need to test */
if (!video->attached_count)
/*
* If we have a broken _DOD or we have more than 8 output devices
* under the graphics controller node that we can't proper deal with
* in the operation region code currently, no need to test.
*/
if (!video->attached_count || video->child_count > 8)
return true;

for (i = 0; i < video->attached_count; i++) {
Expand Down Expand Up @@ -1413,6 +1418,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
dev_err(&dev->dev, "Can't attach device\n");
break;
}
video->child_count++;
}
return status;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ config ATA_ACPI

config SATA_ZPODD
bool "SATA Zero Power Optical Disc Drive (ZPODD) support"
depends on ATA_ACPI && PM_RUNTIME
depends on ATA_ACPI && PM
default n
help
This option adds support for SATA Zero Power Optical Disc
Expand Down
Loading

0 comments on commit c0f486f

Please sign in to comment.