summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/cpu.h
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2015-11-23 13:12:21 +0300
committerIngo Molnar <mingo@kernel.org>2015-11-24 11:15:54 +0300
commit99f925ce927e4ac313d9af8bd1bf55796e2cdcb1 (patch)
tree51a3708791496f4d60f895e6f07a628a8f7a68e3 /arch/x86/include/asm/cpu.h
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
downloadlinux-99f925ce927e4ac313d9af8bd1bf55796e2cdcb1.tar.xz
x86/cpu: Unify CPU family, model, stepping calculation
Add generic functions which calc family, model and stepping from the CPUID_1.EAX leaf and stick them into the library we have. Rename those which do call CPUID with the prefix "x86_cpuid" as suggested by Paolo Bonzini. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> 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/1448273546-2567-2-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/cpu.h')
-rw-r--r--arch/x86/include/asm/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index bf2caa1dedc5..678637ad7476 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -36,4 +36,7 @@ extern int _debug_hotplug_cpu(int cpu, int action);
int mwait_usable(const struct cpuinfo_x86 *);
+unsigned int x86_family(unsigned int sig);
+unsigned int x86_model(unsigned int sig);
+unsigned int x86_stepping(unsigned int sig);
#endif /* _ASM_X86_CPU_H */