* [PATCH 1/2] powercap/intel_rapl: relax sanity check on energy counters @ 2014-02-10 14:11 Jacob Pan 2014-02-10 14:11 ` [PATCH 2/2] powercap/intel_rapl: spell out soc names Jacob Pan 0 siblings, 1 reply; 2+ messages in thread From: Jacob Pan @ 2014-02-10 14:11 UTC (permalink / raw) To: Linux PM, Rafael Wysocki, Srinivas Pandruvada; +Cc: vince, Jacob Pan 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 <jacob.jun.pan@linux.intel.com> --- 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 3c67683..0e37fe1 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); -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] powercap/intel_rapl: spell out soc names 2014-02-10 14:11 [PATCH 1/2] powercap/intel_rapl: relax sanity check on energy counters Jacob Pan @ 2014-02-10 14:11 ` Jacob Pan 0 siblings, 0 replies; 2+ messages in thread From: Jacob Pan @ 2014-02-10 14:11 UTC (permalink / raw) To: Linux PM, Rafael Wysocki, Srinivas Pandruvada; +Cc: vince, Jacob Pan Spell out names for supported SOCs. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> --- 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 0e37fe1..61b51e1 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 */ {} }; -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-10 22:11 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-02-10 14:11 [PATCH 1/2] powercap/intel_rapl: relax sanity check on energy counters Jacob Pan 2014-02-10 14:11 ` [PATCH 2/2] powercap/intel_rapl: spell out soc names Jacob Pan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).