linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend] intel_rapl: downgrade message if no RAPL domains found in a VM
@ 2016-07-19 11:49 Paolo Bonzini
  2016-07-19 12:27 ` Jacob Pan
  2016-07-21 13:19 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2016-07-19 11:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Renninger, Peter Zijlstra, rjw, linux-pm, Jacob Pan,
	Andy Lutomirski

People complain about the driver saying there's no valid RAPL domains
in a VM, and doing so at KERN_ERR severity.  Downgrade this to KERN_INFO
if running on a hypervisor, since it is basically stating the obvious.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
	First sent out about a year ago. :)

 drivers/powercap/intel_rapl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index b2766b867b0e..0a0b09910116 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1392,7 +1392,9 @@ static int rapl_detect_domains(struct rapl_package *rp, int cpu)
 	}
 	rp->nr_domains = bitmap_weight(&rp->domain_map,	RAPL_DOMAIN_MAX);
 	if (!rp->nr_domains) {
-		pr_err("no valid rapl domains found in package %d\n", rp->id);
+		printk("%sNo valid RAPL domains found in package %d\n",
+		       boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR,
+		       rp->id);
 		ret = -ENODEV;
 		goto done;
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-21 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 11:49 [PATCH resend] intel_rapl: downgrade message if no RAPL domains found in a VM Paolo Bonzini
2016-07-19 12:27 ` Jacob Pan
2016-07-21 13:19 ` Rafael J. Wysocki
2016-07-21 14:58   ` Paolo Bonzini

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).