Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp387275yba; Mon, 1 Apr 2019 08:19:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYBr9XohngEdh8/72mpWCmvvM8b07s9Sj5PStv0rBXxBE47ioQao0otjLT6/qt6agApwRa X-Received: by 2002:a17:902:8606:: with SMTP id f6mr66954392plo.151.1554131986038; Mon, 01 Apr 2019 08:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554131986; cv=none; d=google.com; s=arc-20160816; b=yj+TwY0f+j8y7gLVljtfvPF/j6VyHSTJ+wn6cCBh1+eWr42ERbYRJ1TER2VqRYgIm8 NwzH8N8Q/euZUensxTBCqY1Pb952vNCWScUzdc6+twt/3ptq5KUL9twVd9dQJSnmkjPM LbPAxugaaUP3ml7mLyV8s8ZyOYeZKaeSveWhHa/WVyTWmLHsKLayPXq5qweewDjwVs44 IM3/88WqbwRcnll4cCCqX6PcBBUv1fbwkvd0ok0uO2McroqvwRyn/giL/70i5U0mjn5i IdbkE5u+3mPTwsk6BrYyV4IZMs4XstxauldtrlCw0T283XJc1kHoInXKtYRoFallF4Hp VRbA== 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=HQ3v92Aky6Os+/5fJIoyfTNdmhWX612unVo44yV3o3s=; b=vdo5gQW50CJEBKTkRwwSpzA7ZRBe9htH3+6Q1+n5sRXNIGWFqj6OPdguS+UuH+cR3S wF0BIYsXTts5VnGWOVrvawKMINvK22SimvJase5JNlygxMmkUjVbWlcp6MwLEX5Stike vnLovZV2zAXBixbo0W/UYHq8RZ9Aaz4eXRdeqmrIwrUD9exn6i2MeeO4eyYrtDusci2H P7tpVfnVt21U+kFSENQrHGjrRt+QeqbTCtLpt0omns9RwNLgpNF4Dv9x+VBhJlWfc5l3 6KphWNN58Ubel2pVz/06/3HhM2ZxABqsEjUFKXEL3oyPyX+EKE01jXJml3yF6uId425m 79DQ== 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 u79si4866163pfa.6.2019.04.01.08.19.30; Mon, 01 Apr 2019 08:19:46 -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 S1727074AbfDAPSw (ORCPT + 99 others); Mon, 1 Apr 2019 11:18:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:52610 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726637AbfDAPSv (ORCPT ); Mon, 1 Apr 2019 11:18:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 78513AF58; Mon, 1 Apr 2019 15:18:50 +0000 (UTC) From: Thomas Renninger 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: Mon, 01 Apr 2019 17:18:49 +0200 Message-ID: <9389251.Bs5y7Thn0n@house> 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. Nice. I wondered whether there are more of these to find by review, instead of waiting for the next message to show up. I ended up in the "not so straight forward" IOMMU init macros... and continued with daily work again. Anyway there are a lot files showing up when grepping the kernel for intel files/drivers, maybe someone who is involved in the one or other comes up with something similar... Thomas FWIW: Reviewed-by: Thomas Renninger > 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; > + ...