Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp372580yba; Mon, 1 Apr 2019 08:04:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEkLaY+9Cshw/LMhqLcuv2RxivMaxAc2P5AxMgTVk8cugY0rTMcV2NpxMIRgqlK1ZqmzxX X-Received: by 2002:a62:1d0d:: with SMTP id d13mr28282486pfd.96.1554131087894; Mon, 01 Apr 2019 08:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554131087; cv=none; d=google.com; s=arc-20160816; b=afHYEZyRvJKbXnpQ7t+OsldnF9jk129/+ZTRhBA0pFPAAutk9XXC2rTD4TNnjnZ/cU jP7YE0zIy+PmKfUt9pPzo/9nAFYqSsNksi+67OhpHLNGU95d/4u8xXnMTl/y0lDjJsGx vxBX4BB7sxd/ZEzMl2duwa0l3M20cuAZqei5auzVVXSLpSxDhVZF7WRr69ik3C99VvUJ A+Mr9h7t8/ICS2BkPq6vIbVjVjWKdQ360sXpCWSbGZqSGDRvaA70bq9e/tzO3hkg2Xpz dLFO71tJ0n9izygdRERPLcOSx/fLKail5qlMt0Aj4C2Qq5VdcEwhSGvxkrOqcTrw6uls zC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ID4grBT9wHWRYXPPSwvRThRgD8ziDtniErq38bMC/B4=; b=oMRq+mPGGvPPx6fn8aFt6lUqQg9h+THGHmkhPSLsYluWfy08XjBX38Clj048x5Ptw2 mpPbKhhtAef8pnEJ5MUWIRNINMvP6pB2EyDYNZaDgw+cncEzs8jZgA5m+/9i0chXOya2 f9h0G+5OCUCNhOY4kZfAwxDCMr9bXxF/MHI4Z7Y/Hbhg7xk0XD2v+F+HLl8DFxZNyA75 vDLvqSaEdz4kUHaQxRLDy0IjlgUAFqoSblrahxIUhUu7NHEkh/VhEBNoODXcXwq60FB6 1lM0apkt2tYiYOZdGWBlPj9RM2ZUdqD9BEmwEKnrVapDtc34Bc6P0p2ZGW3Ak3ANwhK6 BAbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Sownw1wD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si8785351pgu.437.2019.04.01.08.04.32; Mon, 01 Apr 2019 08:04:47 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=Sownw1wD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbfDAPDv (ORCPT + 99 others); Mon, 1 Apr 2019 11:03:51 -0400 Received: from mail.skyhub.de ([5.9.137.197]:58120 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbfDAPDv (ORCPT ); Mon, 1 Apr 2019 11:03:51 -0400 Received: from zn.tnic (p200300EC2F148A00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f14:8a00:329c:23ff:fea6:a903]) (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 4F4091EC0354; Mon, 1 Apr 2019 17:03:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1554131029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=ID4grBT9wHWRYXPPSwvRThRgD8ziDtniErq38bMC/B4=; b=Sownw1wDqHwxMCtpDZ/JpBApBrufD5+r2Xoo47aMyHExqGyDE207xkBQbL9C6wNBTbbqh9 xCLeAWnzyQApZXOWOUu9Ei6d3Ifw0vIpWcVmNlrW6R7bE8tN9BXofhqYu3iE/0nMmir3t0 n7dM2Qd6vAvqb+RqdAu0yvWgtxzq/nc= Date: Mon, 1 Apr 2019 17:03:45 +0200 From: Borislav Petkov To: Erwan Velu Cc: LKML , Len Brown , "linux-pm@vger.kernel.org" , "Rafael J . Wysocki" , Srinivas Pandruvada , Viresh Kumar Subject: [PATCH] cpufreq/intel_pstate: Load only on Intel hardware Message-ID: <20190401150345.GJ28264@zn.tnic> References: <20190330100225.14744-1-bp@alien8.de> <20190401083902.GC28264@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190401083902.GC28264@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.21.0 -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.