From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759936AbcDMLfn (ORCPT ); Wed, 13 Apr 2016 07:35:43 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56070 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759073AbcDMLfj (ORCPT ); Wed, 13 Apr 2016 07:35:39 -0400 Date: Wed, 13 Apr 2016 04:34:38 -0700 From: tip-bot for Alexander Shishkin Message-ID: Cc: a.p.zijlstra@chello.nl, hpa@zytor.com, bp@alien8.de, mingo@kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de, alexander.shishkin@linux.intel.com, bp@suse.de, linux-kernel@vger.kernel.org, acme@infradead.org Reply-To: peterz@infradead.org, mingo@kernel.org, torvalds@linux-foundation.org, bp@alien8.de, hpa@zytor.com, a.p.zijlstra@chello.nl, acme@infradead.org, linux-kernel@vger.kernel.org, bp@suse.de, alexander.shishkin@linux.intel.com, tglx@linutronix.de In-Reply-To: <1459953307-14372-1-git-send-email-alexander.shishkin@linux.intel.com> References: <1459953307-14372-1-git-send-email-alexander.shishkin@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/x86/intel/pt: Use boot_cpu_has() because it's there Git-Commit-ID: e465de1cd5e1759e40f077bac287de60d56ad06c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e465de1cd5e1759e40f077bac287de60d56ad06c Gitweb: http://git.kernel.org/tip/e465de1cd5e1759e40f077bac287de60d56ad06c Author: Alexander Shishkin AuthorDate: Wed, 6 Apr 2016 17:35:07 +0300 Committer: Ingo Molnar CommitDate: Wed, 13 Apr 2016 10:49:23 +0200 perf/x86/intel/pt: Use boot_cpu_has() because it's there At the moment, initialization path is using test_cpu_cap(&boot_cpu_data), to detect PT, which is just open coding boot_cpu_has(). Use the latter instead. Signed-off-by: Alexander Shishkin Acked-by: Borislav Petkov Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: eranian@google.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/1459953307-14372-1-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar --- arch/x86/events/intel/pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 127f58c..1aefd43 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -1106,7 +1106,7 @@ static __init int pt_init(void) BUILD_BUG_ON(sizeof(struct topa) > PAGE_SIZE); - if (!test_cpu_cap(&boot_cpu_data, X86_FEATURE_INTEL_PT)) + if (!boot_cpu_has(X86_FEATURE_INTEL_PT)) return -ENODEV; get_online_cpus();