From patchwork Sat Mar 30 10:02:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 10878265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9700213B5 for ; Sat, 30 Mar 2019 10:02:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C97928F77 for ; Sat, 30 Mar 2019 10:02:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B29A28FA3; Sat, 30 Mar 2019 10:02:28 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 DF40828F77 for ; Sat, 30 Mar 2019 10:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730590AbfC3KC1 (ORCPT ); Sat, 30 Mar 2019 06:02:27 -0400 Received: from mail.skyhub.de ([5.9.137.197]:46596 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730532AbfC3KC1 (ORCPT ); Sat, 30 Mar 2019 06:02:27 -0400 Received: from zn.tnic (p200300EC2F148A00C43C95AA310C833A.dip0.t-ipconnect.de [IPv6:2003:ec:2f14:8a00:c43c:95aa:310c:833a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 3648C1EC066F; Sat, 30 Mar 2019 11:02:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1553940145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=fPgktxmAoVc55FNFVGCEpY8L5UOzA8MrHbl6ThgEQBY=; b=TD6HiWvlY6sw5rz+KHKtZq/YNs0nhajn5roI4hESZnU60puluYUfkimnZDRE0cZhzX53Kx jjuFzrLYxvDMj5x+Yfw217ZDDF8fAmHmZ9Kmg7OaFKM3f5dhv5jXSITcVtUVvgwj0fIiD0 NCtcW+hVHRlwDXYCsx7jknKRgPqMQCo= From: Borislav Petkov To: LKML Cc: Erwan Velu , Len Brown , linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Srinivas Pandruvada , Viresh Kumar Subject: [PATCH] cpufreq/intel_pstate: Do not issue the not supported message on !Intel Date: Sat, 30 Mar 2019 11:02:25 +0100 Message-Id: <20190330100225.14744-1-bp@alien8.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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 From: Borislav Petkov Issue the CPU-not-supported message only on Intel machines as this driver is Intel-only. Which means, the print statement can remain KERN_INFO for ease of debugging (no need to enable it first in dynamic debug). While at it, correct it to say CPU "model" which is what that test does. Fixes: 076b862c7e44 ("cpufreq: intel_pstate: Add reasons for failure and debug messages") Signed-off-by: Borislav Petkov Cc: Erwan Velu Cc: Len Brown Cc: linux-pm@vger.kernel.org Cc: Rafael J. Wysocki CC: Srinivas Pandruvada Cc: Viresh Kumar --- drivers/cpufreq/intel_pstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index ea62e3f02d56..19854f01e2fa 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -2608,7 +2608,9 @@ static int __init intel_pstate_init(void) } else { id = x86_match_cpu(intel_pstate_cpu_ids); if (!id) { - pr_info("CPU ID not supported\n"); + if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) + pr_info("CPU model not supported\n"); + return -ENODEV; }