Skip to content

Commit c0f486f

Browse files
committed
Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/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() ...
2 parents 385336e + 2ec1c17 commit c0f486f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+199
-156
lines changed

Documentation/kernel-parameters.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
14571457
disable
14581458
Do not enable intel_pstate as the default
14591459
scaling driver for the supported processors
1460+
force
1461+
Enable intel_pstate on systems that prohibit it by default
1462+
in favor of acpi-cpufreq. Forcing the intel_pstate driver
1463+
instead of acpi-cpufreq may disable platform features, such
1464+
as thermal controls and power capping, that rely on ACPI
1465+
P-States information being indicated to OSPM and therefore
1466+
should be used with caution. This option does not work with
1467+
processors that aren't supported by the intel_pstate driver
1468+
or on platforms that use pcc-cpufreq instead of acpi-cpufreq.
14601469
no_hwp
14611470
Do not enable hardware P state control (HWP)
14621471
if available.

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4963,6 +4963,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git
49634963
S: Supported
49644964
F: drivers/idle/intel_idle.c
49654965

4966+
INTEL PSTATE DRIVER
4967+
M: Kristen Carlson Accardi <kristen@linux.intel.com>
4968+
L: linux-pm@vger.kernel.org
4969+
S: Supported
4970+
F: drivers/cpufreq/intel_pstate.c
4971+
49664972
INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
49674973
M: Maik Broemme <mbroemme@plusserver.de>
49684974
L: linux-fbdev@vger.kernel.org

arch/arm/kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static void armpmu_disable(struct pmu *pmu)
484484
armpmu->stop(armpmu);
485485
}
486486

487-
#ifdef CONFIG_PM_RUNTIME
487+
#ifdef CONFIG_PM
488488
static int armpmu_runtime_resume(struct device *dev)
489489
{
490490
struct arm_pmu_platdata *plat = dev_get_platdata(dev);

arch/arm/mach-davinci/pm_domain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <linux/pm_clock.h>
1515
#include <linux/platform_device.h>
1616

17-
#ifdef CONFIG_PM_RUNTIME
17+
#ifdef CONFIG_PM
1818
static int davinci_pm_runtime_suspend(struct device *dev)
1919
{
2020
int ret;

arch/arm/mach-exynos/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ menuconfig ARCH_EXYNOS
2121
select HAVE_S3C_RTC if RTC_CLASS
2222
select PINCTRL
2323
select PINCTRL_EXYNOS
24-
select PM_GENERIC_DOMAINS if PM_RUNTIME
24+
select PM_GENERIC_DOMAINS if PM
2525
select S5P_DEV_MFC
2626
select SRAM
2727
select MFD_SYSCON

arch/arm/mach-keystone/pm_domain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <linux/clk-provider.h>
2020
#include <linux/of.h>
2121

22-
#ifdef CONFIG_PM_RUNTIME
22+
#ifdef CONFIG_PM
2323
static int keystone_pm_runtime_suspend(struct device *dev)
2424
{
2525
int ret;

arch/arm/mach-omap1/pm_bus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "soc.h"
2323

24-
#ifdef CONFIG_PM_RUNTIME
24+
#ifdef CONFIG_PM
2525
static int omap1_pm_runtime_suspend(struct device *dev)
2626
{
2727
int ret;
@@ -59,7 +59,7 @@ static struct dev_pm_domain default_pm_domain = {
5959
#define OMAP1_PM_DOMAIN (&default_pm_domain)
6060
#else
6161
#define OMAP1_PM_DOMAIN NULL
62-
#endif /* CONFIG_PM_RUNTIME */
62+
#endif /* CONFIG_PM */
6363

6464
static struct pm_clk_notifier_block platform_bus_notifier = {
6565
.pm_domain = OMAP1_PM_DOMAIN,

arch/arm/mach-omap2/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static void __init omap_hwmod_init_postsetup(void)
361361
u8 postsetup_state;
362362

363363
/* Set the default postsetup state for all hwmods */
364-
#ifdef CONFIG_PM_RUNTIME
364+
#ifdef CONFIG_PM
365365
postsetup_state = _HWMOD_STATE_IDLE;
366366
#else
367367
postsetup_state = _HWMOD_STATE_ENABLED;

arch/arm/mach-omap2/omap_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ struct platform_device __init *omap_device_build_ss(const char *pdev_name,
588588
return ERR_PTR(ret);
589589
}
590590

591-
#ifdef CONFIG_PM_RUNTIME
591+
#ifdef CONFIG_PM
592592
static int _od_runtime_suspend(struct device *dev)
593593
{
594594
struct platform_device *pdev = to_platform_device(dev);

arch/ia64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ config IA64_SGI_UV
231231
config IA64_HP_SIM
232232
bool "Ski-simulator"
233233
select SWIOTLB
234-
depends on !PM_RUNTIME
234+
depends on !PM
235235

236236
endchoice
237237

arch/x86/kernel/apic/io_apic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3968,7 +3968,7 @@ bool mp_should_keep_irq(struct device *dev)
39683968
{
39693969
if (dev->power.is_prepared)
39703970
return true;
3971-
#ifdef CONFIG_PM_RUNTIME
3971+
#ifdef CONFIG_PM
39723972
if (dev->power.runtime_status == RPM_SUSPENDING)
39733973
return true;
39743974
#endif

drivers/acpi/device_pm.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,13 +680,21 @@ static int acpi_device_wakeup(struct acpi_device *adev, u32 target_state,
680680
if (error)
681681
return error;
682682

683+
if (adev->wakeup.flags.enabled)
684+
return 0;
685+
683686
res = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number);
684-
if (ACPI_FAILURE(res)) {
687+
if (ACPI_SUCCESS(res)) {
688+
adev->wakeup.flags.enabled = 1;
689+
} else {
685690
acpi_disable_wakeup_device_power(adev);
686691
return -EIO;
687692
}
688693
} else {
689-
acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
694+
if (adev->wakeup.flags.enabled) {
695+
acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
696+
adev->wakeup.flags.enabled = 0;
697+
}
690698
acpi_disable_wakeup_device_power(adev);
691699
}
692700
return 0;

drivers/acpi/ec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ static int ec_install_handlers(struct acpi_ec *ec)
844844

845845
static void ec_remove_handlers(struct acpi_ec *ec)
846846
{
847+
if (!test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
848+
return;
847849
acpi_disable_gpe(NULL, ec->gpe);
848850
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
849851
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))

drivers/acpi/fan.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ static int acpi_fan_probe(struct platform_device *pdev)
325325
struct thermal_cooling_device *cdev;
326326
struct acpi_fan *fan;
327327
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
328+
char *name;
328329

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

349-
cdev = thermal_cooling_device_register("Fan", device,
350+
if (!strncmp(pdev->name, "PNP0C0B", strlen("PNP0C0B")))
351+
name = "Fan";
352+
else
353+
name = acpi_device_bid(device);
354+
355+
cdev = thermal_cooling_device_register(name, device,
350356
&fan_cooling_ops);
351357
if (IS_ERR(cdev)) {
352358
result = PTR_ERR(cdev);

drivers/acpi/scan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ static void acpi_device_dep_initialize(struct acpi_device *adev)
22142214
status = acpi_evaluate_reference(adev->handle, "_DEP", NULL,
22152215
&dep_devices);
22162216
if (ACPI_FAILURE(status)) {
2217-
dev_err(&adev->dev, "Failed to evaluate _DEP.\n");
2217+
dev_dbg(&adev->dev, "Failed to evaluate _DEP.\n");
22182218
return;
22192219
}
22202220

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

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

drivers/acpi/utils.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -346,22 +346,16 @@ acpi_evaluate_reference(acpi_handle handle,
346346
package = buffer.pointer;
347347

348348
if ((buffer.length == 0) || !package) {
349-
printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
350-
(unsigned)buffer.length, package);
351349
status = AE_BAD_DATA;
352350
acpi_util_eval_error(handle, pathname, status);
353351
goto end;
354352
}
355353
if (package->type != ACPI_TYPE_PACKAGE) {
356-
printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
357-
package->type);
358354
status = AE_BAD_DATA;
359355
acpi_util_eval_error(handle, pathname, status);
360356
goto end;
361357
}
362358
if (!package->package.count) {
363-
printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
364-
package);
365359
status = AE_BAD_DATA;
366360
acpi_util_eval_error(handle, pathname, status);
367361
goto end;
@@ -380,17 +374,13 @@ acpi_evaluate_reference(acpi_handle handle,
380374

381375
if (element->type != ACPI_TYPE_LOCAL_REFERENCE) {
382376
status = AE_BAD_DATA;
383-
printk(KERN_ERR PREFIX
384-
"Expecting a [Reference] package element, found type %X\n",
385-
element->type);
386377
acpi_util_eval_error(handle, pathname, status);
387378
break;
388379
}
389380

390381
if (!element->reference.handle) {
391-
printk(KERN_WARNING PREFIX "Invalid reference in"
392-
" package %s\n", pathname);
393382
status = AE_NULL_ENTRY;
383+
acpi_util_eval_error(handle, pathname, status);
394384
break;
395385
}
396386
/* Get the acpi_handle. */

drivers/acpi/video.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ struct acpi_video_bus {
155155
u8 dos_setting;
156156
struct acpi_video_enumerated_device *attached_array;
157157
u8 attached_count;
158+
u8 child_count;
158159
struct acpi_video_bus_cap cap;
159160
struct acpi_video_bus_flags flags;
160161
struct list_head video_device_list;
@@ -1159,8 +1160,12 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device)
11591160
struct acpi_video_bus *video = device->video;
11601161
int i;
11611162

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

11661171
for (i = 0; i < video->attached_count; i++) {
@@ -1413,6 +1418,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
14131418
dev_err(&dev->dev, "Can't attach device\n");
14141419
break;
14151420
}
1421+
video->child_count++;
14161422
}
14171423
return status;
14181424
}

drivers/ata/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ config ATA_ACPI
6161

6262
config SATA_ZPODD
6363
bool "SATA Zero Power Optical Disc Drive (ZPODD) support"
64-
depends on ATA_ACPI && PM_RUNTIME
64+
depends on ATA_ACPI && PM
6565
default n
6666
help
6767
This option adds support for SATA Zero Power Optical Disc

0 commit comments

Comments
 (0)