public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/pt: Use boot_cpu_has() because it's there
@ 2016-04-06 14:35 Alexander Shishkin
  2016-04-06 16:57 ` Borislav Petkov
  2016-04-13 11:34 ` [tip:perf/core] " tip-bot for Alexander Shishkin
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shishkin @ 2016-04-06 14:35 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, linux-kernel, vince, eranian,
	Arnaldo Carvalho de Melo, Borislav Petkov, Alexander Shishkin

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 <alexander.shishkin@linux.intel.com>
---
 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 32b613e863..7c7f09a8fe 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -1159,7 +1159,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();
-- 
2.8.0.rc3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-13 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 14:35 [PATCH] perf/x86/intel/pt: Use boot_cpu_has() because it's there Alexander Shishkin
2016-04-06 16:57 ` Borislav Petkov
2016-04-13 11:34 ` [tip:perf/core] " tip-bot for Alexander Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox