Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1322358

[tip:x86/asm] x86/vdso: Use static_cpu_has()

From tip-bot for Borislav Petkov <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:x86/asm] x86/vdso: Use static_cpu_has()
Date 2016-01-30 14:30 +0100
Message-ID <qWDLc-3v2-13@gated-at.bofh.it> (permalink)
References <qVjbQ-1GJ-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  8c725306993198f845038dc9e45a1267099867a6
Gitweb:     http://git.kernel.org/tip/8c725306993198f845038dc9e45a1267099867a6
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Tue, 26 Jan 2016 22:12:09 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 30 Jan 2016 11:22:23 +0100

x86/vdso: Use static_cpu_has()

... and simplify and speed up a tad.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1453842730-28463-10-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/entry/vdso/vma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 429d54d..10f7045 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -285,7 +285,7 @@ static void vgetcpu_cpu_init(void *arg)
 #ifdef CONFIG_NUMA
 	node = cpu_to_node(cpu);
 #endif
-	if (cpu_has(&cpu_data(cpu), X86_FEATURE_RDTSCP))
+	if (static_cpu_has(X86_FEATURE_RDTSCP))
 		write_rdtscp_aux((node << 12) | cpu);
 
 	/*

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[tip:x86/asm] x86/vdso: Use static_cpu_has() tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-01-30 14:30 +0100

csiph-web