lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 13 Apr 2016 04:34:38 -0700
From:	tip-bot for Alexander Shishkin <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	a.p.zijlstra@...llo.nl, hpa@...or.com, bp@...en8.de,
	mingo@...nel.org, peterz@...radead.org,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	alexander.shishkin@...ux.intel.com, bp@...e.de,
	linux-kernel@...r.kernel.org, acme@...radead.org
Subject: [tip:perf/core] perf/x86/intel/pt: Use boot_cpu_has() because it's
 there

Commit-ID:  e465de1cd5e1759e40f077bac287de60d56ad06c
Gitweb:     http://git.kernel.org/tip/e465de1cd5e1759e40f077bac287de60d56ad06c
Author:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>
AuthorDate: Wed, 6 Apr 2016 17:35:07 +0300
Committer:  Ingo Molnar <mingo@...nel.org>
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 <alexander.shishkin@...ux.intel.com>
Acked-by: Borislav Petkov <bp@...e.de>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: eranian@...gle.com
Cc: vince@...ter.net
Link: http://lkml.kernel.org/r/1459953307-14372-1-git-send-email-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 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();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ