From patchwork Mon May 23 16:45:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Pan X-Patchwork-Id: 9132157 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 33A87607D6 for ; Mon, 23 May 2016 16:47:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A273281CB for ; Mon, 23 May 2016 16:47:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F15B2823D; Mon, 23 May 2016 16:47:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D3028238 for ; Mon, 23 May 2016 16:47:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753854AbcEWQrR (ORCPT ); Mon, 23 May 2016 12:47:17 -0400 Received: from mga02.intel.com ([134.134.136.20]:48071 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbcEWQrQ (ORCPT ); Mon, 23 May 2016 12:47:16 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 May 2016 09:47:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,356,1459839600"; d="scan'208";a="960600309" Received: from icelake.jf.intel.com ([10.7.199.52]) by orsmga001.jf.intel.com with ESMTP; 23 May 2016 09:47:15 -0700 From: Jacob Pan To: LKML , Rafael Wysocki , Linux PM Cc: Srinivas Pandruvada , Prarit Bhargava , Jacob Pan Subject: [PATCH 2/2] powercap/rapl: reduce warning level Date: Mon, 23 May 2016 09:45:43 -0700 Message-Id: <1464021943-14915-3-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464021943-14915-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1464021943-14915-1-git-send-email-jacob.jun.pan@linux.intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since RAPL interface is not architectual, its enumeration depends on poking MSRs instead of using CPUID method. In KVM guest, RAPL driver probe will fail and emit the following message for every CPU: no valid rapl domains found in package This patch limit the warning to debug only. Still return ENODEV so that RAPL does not run on KVM guest. Signed-off-by: Jacob Pan --- drivers/powercap/intel_rapl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index a417e68..b0a2dc4 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c @@ -1324,7 +1324,7 @@ 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); + pr_debug("no valid rapl domains found in package %d\n", rp->id); ret = -ENODEV; goto done; }