x86/cpu: Unify CPU family, model, stepping calculation
authorBorislav Petkov <bp@suse.de>
Mon, 23 Nov 2015 10:12:21 +0000 (11:12 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 24 Nov 2015 08:15:54 +0000 (09:15 +0100)
commit99f925ce927e4ac313d9af8bd1bf55796e2cdcb1
tree51a3708791496f4d60f895e6f07a628a8f7a68e3
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4
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>
arch/x86/include/asm/cpu.h
arch/x86/include/asm/microcode.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/microcode/intel.c
arch/x86/lib/Makefile
arch/x86/lib/cpu.c [new file with mode: 0644]