Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1091017yba; Tue, 2 Apr 2019 02:00:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvtuKeGT4b6eqtr3xmPw7C4djryPQxYePLrpsF6/sFn1gXG9htaih1oB17XREh7VBsskwe X-Received: by 2002:aa7:8615:: with SMTP id p21mr43555670pfn.98.1554195636577; Tue, 02 Apr 2019 02:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554195636; cv=none; d=google.com; s=arc-20160816; b=SA0Fk/jZ9VDx6Ka3qnHd2Q+X5q1IG0dAMxOQufAXKcbNKUuUGmCMMUc2kQUwmsr5nY nII+DpZ9lEh4jtglJ463n0JfUGZJHfOaojufatc/WINzcuKR9pYZdzJpWbyK5Ef6JFqA GxhJhtErW4hFiC03cM+jSh64nSUFBgLhemnrV+4j+rTCei8mC65gd32aUQ03nGF0jVqw 6E4Ujkk7YIrgBNH9Ub6ujsWnctsXX9OT68tvokr+gYR+CUtXCOBeo96p0JzaziofxvxA TA0z74EizqHc1ySkrCBv82koGcl3Wca+Vr+2AkrDBJDvaUViXnvZakt4h3TpHg/1u5kp z0Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yoaJk4kQ1Ug7Wed8k/EF10UIhekBYjDOtlV5rEYfpEA=; b=LhGUEgFA5Ar9RrEfej6Fm38q9+sQD6aDln0jcW8rqA69JLY3KHtZYGpNdnyGANpp7G H4+mx1I0BeH+tFdFJw5xXnxDxI55gxGwnWUMviHI8IhE6U836ZaiyJ2MjJIvwrfiul3v IGFYn6FYz0fuNvmVPOQFtwkN1/kVI3WTmuN0RpPNZSR6iaX86b9Nc3uDrGDy0IxcKdTb hJNh2o9XHf6BayMwuu4kn9Bx16vLMYdcNA8pECj7HDH2jxqfXGojP1ee8H5YuDIDmYNL 3foK/j7Zk00pznSXDuF0sdEjF4xTNX4AiQBFk1ca0RDHIRvO0oQruWcEFlKbbUnbi4kb xPlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si11017925plb.426.2019.04.02.02.00.20; Tue, 02 Apr 2019 02:00:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729545AbfDBIlA (ORCPT + 99 others); Tue, 2 Apr 2019 04:41:00 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:58013 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729477AbfDBIlA (ORCPT ); Tue, 2 Apr 2019 04:41:00 -0400 Received: from 79.184.254.219.ipv4.supernova.orange.pl (79.184.254.219) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.213) id 3138d2579266a92a; Tue, 2 Apr 2019 10:40:57 +0200 From: "Rafael J. Wysocki" To: Borislav Petkov Cc: Erwan Velu , LKML , Len Brown , "linux-pm@vger.kernel.org" , "Rafael J . Wysocki" , Srinivas Pandruvada , Viresh Kumar Subject: Re: [PATCH] cpufreq/intel_pstate: Load only on Intel hardware Date: Tue, 02 Apr 2019 10:38:52 +0200 Message-ID: <1751498.6LRAoAyAK1@aspire.rjw.lan> In-Reply-To: <20190401150345.GJ28264@zn.tnic> References: <20190330100225.14744-1-bp@alien8.de> <20190401083902.GC28264@zn.tnic> <20190401150345.GJ28264@zn.tnic> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, April 1, 2019 5:03:45 PM CEST Borislav Petkov wrote: > From: Borislav Petkov > > This driver is Intel-only so loading on anything which is not Intel is > pointless. Prevent it from doing so. > > While at it, correct the "not supported" print statement to say CPU > "model" which is what that test does. > > Suggested-by: Erwan Velu > Signed-off-by: Borislav Petkov > Cc: Len Brown > Cc: linux-pm@vger.kernel.org > Cc: Rafael J. Wysocki > CC: Srinivas Pandruvada > Cc: Viresh Kumar > --- > drivers/cpufreq/intel_pstate.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c > index b599c7318aab..2986119dd31f 100644 > --- a/drivers/cpufreq/intel_pstate.c > +++ b/drivers/cpufreq/intel_pstate.c > @@ -2596,6 +2596,9 @@ static int __init intel_pstate_init(void) > const struct x86_cpu_id *id; > int rc; > > + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) > + return -ENODEV; > + > if (no_load) > return -ENODEV; > > @@ -2611,7 +2614,7 @@ 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"); > + pr_info("CPU model not supported\n"); > return -ENODEV; > } > > Applied, thanks!