From 7b8747725d0a6842a82ea60fe95b9d4d7ae008fd Mon Sep 17 00:00:00 2001 From: Jacob Pan Date: Mon, 10 Feb 2014 06:11:51 -0800 Subject: [PATCH 1/3] powercap / intel_rapl: relax sanity check on energy counters Some RAPL domains may not be active at the time driver is being loaded. Checking energy counter increment may be too strict and time consuming. So relax the sanity check on energy counters of these domains. Otherwise, they may be ignored and become unavailable to the powercap framework. Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki --- drivers/powercap/intel_rapl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index 3c6768378a94..0e37fe106eb2 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c @@ -1147,6 +1147,11 @@ static int rapl_check_domain(int cpu, int domain) if (rdmsrl_safe_on_cpu(cpu, msr, &val1)) return -ENODEV; + /* PP1/uncore/graphics domain may not be active at the time of + * driver loading. So skip further checks. + */ + if (domain == RAPL_DOMAIN_PP1) + return 0; /* energy counters roll slowly on some domains */ while (++retry < 10) { usleep_range(10000, 15000); From d6b2e6d09aa18738dd29277617a186fa827bd7e1 Mon Sep 17 00:00:00 2001 From: Jacob Pan Date: Mon, 10 Feb 2014 06:11:52 -0800 Subject: [PATCH 2/3] powercap / intel_rapl: spell out SoC names Spell out names for supported SoCs. Signed-off-by: Jacob Pan Signed-off-by: Rafael J. Wysocki --- drivers/powercap/intel_rapl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index 0e37fe106eb2..61b51e17d932 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c @@ -834,7 +834,7 @@ static int rapl_write_data_raw(struct rapl_domain *rd, } static const struct x86_cpu_id energy_unit_quirk_ids[] = { - { X86_VENDOR_INTEL, 6, 0x37},/* VLV */ + { X86_VENDOR_INTEL, 6, 0x37},/* Valleyview */ {} }; @@ -947,11 +947,11 @@ static void package_power_limit_irq_restore(int package_id) } static const struct x86_cpu_id rapl_ids[] = { - { X86_VENDOR_INTEL, 6, 0x2a},/* SNB */ - { X86_VENDOR_INTEL, 6, 0x2d},/* SNB EP */ - { X86_VENDOR_INTEL, 6, 0x37},/* VLV */ - { X86_VENDOR_INTEL, 6, 0x3a},/* IVB */ - { X86_VENDOR_INTEL, 6, 0x45},/* HSW */ + { X86_VENDOR_INTEL, 6, 0x2a},/* Sandy Bridge */ + { X86_VENDOR_INTEL, 6, 0x2d},/* Sandy Bridge EP */ + { X86_VENDOR_INTEL, 6, 0x37},/* Valleyview */ + { X86_VENDOR_INTEL, 6, 0x3a},/* Ivy Bridge */ + { X86_VENDOR_INTEL, 6, 0x45},/* Haswell */ /* TODO: Add more CPU IDs after testing */ {} }; From 7fb060820acbc55eeab342d1ce6cdffc80797478 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 20 Mar 2014 03:34:47 +0100 Subject: [PATCH 3/3] MAINTAINERS: Reorder maintainer addresses for PM and ACPI For a few subsystems I am the person who actually applies patches and people don't CC me on patch submissions, because my address is not the first one in the given MAINTAINERS item. Reorder PM and ACPI maintainer addresses in MAINTAINERS to make the probability of that a bit smaller. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek --- MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b3fdb0f004ba..9d33ccbc3934 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -242,8 +242,8 @@ S: Maintained F: drivers/platform/x86/acer-wmi.c ACPI -M: Len Brown M: Rafael J. Wysocki +M: Len Brown L: linux-acpi@vger.kernel.org W: https://01.org/linux-acpi Q: https://patchwork.kernel.org/project/linux-acpi/list/ @@ -3657,8 +3657,8 @@ S: Maintained F: fs/freevxfs/ FREEZER -M: Pavel Machek M: "Rafael J. Wysocki" +M: Pavel Machek L: linux-pm@vger.kernel.org S: Supported F: Documentation/power/freezing-of-tasks.txt @@ -4022,8 +4022,8 @@ S: Maintained F: drivers/video/hgafb.c HIBERNATION (aka Software Suspend, aka swsusp) -M: Pavel Machek M: "Rafael J. Wysocki" +M: Pavel Machek L: linux-pm@vger.kernel.org S: Supported F: arch/x86/power/ @@ -8425,9 +8425,9 @@ F: arch/sh/ F: drivers/sh/ SUSPEND TO RAM +M: "Rafael J. Wysocki" M: Len Brown M: Pavel Machek -M: "Rafael J. Wysocki" L: linux-pm@vger.kernel.org S: Supported F: Documentation/power/